Friday, May 10, 2013

UICollectionView 的問題

registerClass的意義?

UICollectionView registerClass: forCellWithReuseIdentifier method breaks UICollectionView
Assertion failure in dequeueReusableCellWithIdentifier:forIndexPath:


"If you've already created your UICollectionView in Storyboard, connected yourdataSource and delegate, and you have added all of the required methods:
  • numberOfItemsInSection
  • numberOfSectionsInCollectionView
  • cellForItemAtIndexPath
Then the registerClass / registerCell method isn't required."


Reference:
registerClass: forCellWithReuseIdentifier:


.

No comments:

Post a Comment