How can i Stop UITableview cell reloaded While Scrolling the UITableview in iPhone..? [closed]

StackOverflow https://stackoverflow.com/questions/20608114

سؤال

I have already tried to implement UISwitch in the tabeleview cell,now the switch state is automatically changed while i scroll and change the view ,

Please guide me....

هل كانت مفيدة؟

المحلول

You can use NSMutableDictionary for holding the information regarding particular cell UISwitch object. If you have enable a UISwitch button for a cell then set Bool yes and tag value as well in the NSMutableDictionary. Enable the switch for a particular cell object according to NSMutableDictionary values in cellFor rowAtIndexPath.

نصائح أخرى

UITableview reuses the cells, to solve your problem you need to create NSArray for switch states and assign as user scroll up and down (Using NSIndexPath).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top