2014-03-03 27 views
-1

collectionView reloadData不起作用。代碼中出了什麼問題?如果我的問題是沒有足夠的瞭解,我已經在這個環節提到的細節 How to load content fast with images loading in background? 預先感謝您如何重新加載dispatch_async中的collectionViewCell?

-(void)setMovieDetail{ 
    dispatch_async(bgQue, ^{ 

     //code here.. 
     [collectionView reloadData]; 

    }); 
} 
+0

UIKit的方法需要對被稱爲主線程。 –

+0

我在頭文件中調用了UIKIT方法。但不工作.. –

回答

0

你有沒有嘗試過這樣的:

[collectionView performSelectorOnMainThread:@selector(reloadData) 
           withObject:nil 
           waitUntilDone:false]; 
+0

是的,我也試過。但沒有工作。我甚至嘗試使用dispatch_async(dispatch_get_main_queue(),^ {[collectionView reloadData});但不工作。 –

+0

請在這個鏈接看看我的問題:http://stackoverflow.com/questions/22117887/how-to-load-content-fast-with-images-loading-in-background –