But UISwitch is always disappeared after change to ON of OFF.
I search Google and find a lot of developer has this issue and spend a lot of time to debug.
Finally, this bug has removed. Why?
Don't put the code to the cell configure function and that will let you run the code several times.
cell.accessoryView = enableUISwitch;
cell.editingAccessoryView = enableUISwitch;
- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject
atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type
newIndexPath:(NSIndexPath *)newIndexPath
It is only just run one time enough.
This bug makes me almost crazy for two days.
沒有留言:
張貼留言