![](/img/trans.png)
[英]UICollectionView DataSource Method not called on CoreData Change
[英]Datasource method is not called in UICollectionView
我只有一個部分的UICollection。
我的問題是我的數據源方法:
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
當我初始化UICollection時,永遠不會調用它。 然后將有效數字(3)返回到以下數據源方法!
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
在檢查了斷點之后,返回了我在第0節中的項目數,但是仍然沒有調用numberOfItemsInSection
方法。
任何想法 ?
我精確地說,我已經在應用中使用完全相同的框架但沒有相同的數據制作了6個UICollection。 我不知道為什么,這次不起作用。
好吧,我是個白痴。 我忘記了: [self.view addSubview: myCollectionView];
感謝幫助....
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.