Friday, 15 June 2012

ios - UICollectionView cellForItemAtIndexPath Not Called within UITabBarController -



ios - UICollectionView cellForItemAtIndexPath Not Called within UITabBarController -

i have uicollectionview within uiviewcontroller. uiviewcontroller both info source , delegate uicollectionview. populates fine, , works expected. however, when seek , embed uiviewcontroller within uitabbarcontroller via storyboard editor, -(uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath method no longer called.

embedding uiviewcontroller within uitabbarcontroller alter i've made. when remove uitabbarcontroller goes working expected. has else seen type of behavior? missing cause this?

the problem parent view controller's adjust scroll view insets checkbox on. way uicollectionview thinks doesn't have visible cells , doesn't phone call cellforitematindexpath method. unchecking property resolve problem. can find attributes inspector -> view controller / layout section -> adjust scroll view insets. uncheck , voila.

ios xcode uiviewcontroller uitabbarcontroller uicollectionview

No comments:

Post a Comment