Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>UIAppearance is glacially slow on iOS7.0.x. By the above stack trace, it appears that applying appearance methods gets method_exchangeImplementations() called every time (or at least many times), which in turn has to clear out caches in the ObjC runtime for the targeted class and all subclasses, and it will hold a global lock while it does that -- very slow. I have no idea if UIAppearance changed, or there was a change in the ObjC runtime which made this case much more pathologically slow than it used to be.</p> <p>In addition, I think I've seen that the UILabel setShadowOffset: and setShadowColor: methods are also very slow, as they appear to be appearance-swizzled versions and thus have the same problem (despite the fact they are not labeled UI_APPEARANCE_SELECTOR).</p> <p>One overall solution is to just not use UIAppearance as much or at all. For the UILabel methods, check first to see if the value needs changing, and don't call the setters if not needed.</p> <p>Another possible solution is <a href="https://github.com/Collect3/CTAppearance" rel="nofollow" title="CTAppearance">CTAppearance</a> which is a re-implementation of UIAppearance, at least for the UIView-based calls (it does not do anything with UIBarItem appearance calls, which remain slow). It needs some patches currently just in the pull requests, and will not handle UIPopover containers without some help. Its behavior will also be a bit different than UIAppearance (for example it may override some explicitly-set values depending on when they are called) but it may help (a lot) in some situations.</p> <p><strong>Note:</strong> UIAppearance seems to be fixed in iOS 7.1.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload