Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here's my idea,</p> <p>Separate your CALayers from UIButton - UIKit won't allow anything on the background thread. </p> <p>When you have an opportunity in a screen preceding the button grid, use [buttonGridViewController performSelectorInBackground:renderCALayers] to render your CALayers in the background.</p> <p>When you load your button grid in viewDidLoad, overlay UIButtons with type UIButtonTypeCustom, and backgroundColor = [UIColor clearColor] over the top of your 'button' CALayers (make sure to call bringSubviewToFront on the UIButtons so they get the touch events). </p> <p>If you don't know how many buttons you are rendering, you might want to pre-render the maximum number you might display.</p> <p>If you have any questions please comment.</p> <p>EDIT:</p> <p>A few related items,</p> <p><a href="https://stackoverflow.com/questions/1837113/what-to-replace-a-uibutton-to-improve-frame-rate">What to replace a UIButton to improve frame rate?</a></p> <p><a href="https://stackoverflow.com/questions/3927536/ui-design-best-way-to-deal-with-many-uibuttons">UI design - Best way to deal with many UIButtons</a></p> <p><a href="https://stackoverflow.com/questions/573372/how-to-get-touch-event-on-a-calayer">How to get touch event on a CALayer?</a></p> <p>I believe the only way you'll get quicker load from this point is to either replace or remove UIButtons altogether and intercept touch events with another approach. That way all rendering can be done in a background thread before the view is presented.</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.
 

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