sammcewan / WYPopoverController

WYPopoverController is for the presentation of content in popover on iPhone / iPad devices. Very customizable.
Other
252 stars 74 forks source link

Theme observer invokes -updateThemeUI multiple times #81

Closed ashavit closed 7 years ago

ashavit commented 8 years ago

Each time a WYPopoverConrtoller is init, the static theme var is re-configured. But since there is also an observer on the _theme var, the observer is invoked for every changed theme property during the init, which results in performing the -updateThemeUI method about 20 times in a row.

I suggest creating an temp WYPopoverTheme object, and to save it to the static var after fully configured. This will invoke the observer only once.

Thank you.