objective c - UICollectionView cellForItemAtIndexPath: not called in iOS 7 -
so code works in ios 6. when run on ios 7 device, collectionview doesn't populate items , remains empty. have found that:
(uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath doesn't called.
here code create collectionview from
itemoptionlistcollectionviewcontroller *mv1 =[[itemoptionlistcollectionviewcontroller alloc] initwithnibname:@"gridopcija" bundle:nil]; [mv1.collectionview registerclass:[optionlistcollectionviewcell class] forcellwithreuseidentifier:@"cellzaopcije"]; [mv1.collectionview setdelegate:mv1]; mv1.collectionview.datasource= mv1; [mv1 insertlistasdatasource:[ol optionlistitems]]; cgfloat scrollheight = 0; scrollheight= ([ol.optionlistitems count])*40; mv1.view.frame = cgrectmake(0, height, modal.scrollview.frame.size.width,scrollheight); height +=mv1.view.frame.size.height; [modal.scrollview addsubview:mv1.view]; and itemoptionlistcollectionviewcontroller pretty plain, not collectionview:cellforitematindexpath:
any ideas?
Comments
Post a Comment