samedi 7 juin 2014

UIScrollView containing multiple disabled UISwitch controls is lagging. Why?


Vote count:

0




In my iPad app I have a UIScrollView that contains a bunch of UISwitch elements. A group of them (about 12) can be enabled/disabled depending on the group state.


When the group state is "enabled" and I set the UISwitch enabled property to YES the entire scrollview scrolls naturally. When I set the UISwitch enabled property to NO the UIScrollView lags and stutters when scrolling.


I enable/disable the twelve UISwitches like this:



[self.switchOneOutlet setEnabled:NO];


and



[self.speeches setEnabled:YES];


(Of course switchOneOutlet is named more descriptively for each switch.)


Note: I am using Auto Layout but I've tested to see if it has any effect and it doesn't. This seems to be tied strictly to the enabled state of the UISwitch elements sitting in the UIScrollView. I don't believe this is an Auto Layout issue.


Any ideas what could be causing this stutter when the UISwitches are disabled?



asked 46 secs ago

Kent

83





Aucun commentaire:

Enregistrer un commentaire