CollapseClick icon indicating copy to clipboard operation
CollapseClick copied to clipboard

Multiple view's

Open ilia3546 opened this issue 11 years ago • 4 comments

If you add one view multiple times, then the view will appear only in the last item Example: -(int)numberOfCellsForCollapseClick {return 3;} -(UIView *)viewForCollapseClickContentViewAtIndex:(int)index {return imageView;} We add one view 3 times, but view will appear only in the last CollapseClickCell

ilia3546 avatar Jul 24 '13 23:07 ilia3546

This happens because you are using an instance variable or property of the class, and each view that goes into the CollapseClick needs to be a separate alloc'd and init'd view.

bennyguitar avatar Jul 25 '13 13:07 bennyguitar

I'm solve this problem by create multiple copy of view

ilia3546 avatar Jul 25 '13 21:07 ilia3546

Hi ilia3546, Can you explain in detail how did you solve this problem... Coz this is driving me crazy... If you share some code that would be helpful.. Thank you.

Especially when i use a tableview, the data source and delegate methods are not being called

shyamsundar1988 avatar Mar 19 '14 18:03 shyamsundar1988

 -(UIView *)viewForCollapseClickContentViewAtIndex:(int)index 
 {

 UIView *vw;
  for (int i=1; i<3; i++)// could be your array
 {
   vw=[[UIView alloc]initWithFrame:CGRectMake(10, 5, 300, 100)];
   vw.backgroundColor=[UIColor blueColor];
 }
return vw;
}

#ilia3546 this might helps you.. I'm not sure..about it :-)

VaibhaviOSGeek avatar Nov 22 '14 10:11 VaibhaviOSGeek