ios - UICollectionView didSelecteItem Delegate behaving weirdly -


i have uicollectionview show components. vertical scrolling , 1 column.

i adding 2 same objects different data collectionview's datasource @ different sections.

and in cell class initialisation , update methods follow

- (void)commoninitializer {      self.backgroundcolor = kvtcolorwhite;      self.imageview = [[vtuikit imagesquarexl2] addtosuperview:self];     self.imageview.f_x = kvtpadding;     self.imageview.backgroundcolor = kvtcolorbackground;     self.imageview.f_width = [vtadspacedisplaycell cellsize].width - 2*kvtpadding;     self.imageview.f_height = [vtuikit screenwidth]/3.125;     self.imageview.layer.cornerradius = 2.0;     self.imageview.layer.maskstobounds = yes; }   - (void)updatewithmodel:(id)model{      self.model = model;      if (self.model.image == nil) {         [self updateemptycells];     }     else{         [self.imageview setimagewithurl:self.model.image optimizedforsize:[self class] cellsize] withplaceholder:[uiimage imagenamed:@"placeholder-image"]];     } } 

but collectionview's didselectitematindexpath cell being called , not, weird.

i have set collectionview's delegate current class , not adding gesture recogniser cell or collectionview.

but still behaviour strange , random, cant particular scenario debug.

any appreciated.

thanks

the actual problem related uiimageview or uicollectionviewcell.

earlier using [self.collectionview reloadsections:[index]] reloading collectionview's sections , creating problems , dont know why.

but, changed them [self.collectionview reloaddata] , issue gone.

very strange , weird reason issue appear , have no explanation though searched it.

anyways, got issue resolved posting solution answer if helps in future.

thanks


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -