HomeiDevBlogADayUI Polish In An Instant

Comments

UI Polish In An Instant — 2 Comments

  1. You can improve shadow drawing performance by setting the shadowPath property of the layer. e.g…

    [code lang=”objc”]
    layer.shadowPath = [UIBezierPath bezierPathWithRect:layer.bounds].CGPath;
    [/code]

    I believe if you don’t explicitly set that it uses the alpha layer to calculate the shadow path, and it will render off screen which causes a huge performance hit.

  2. Thanks, Ryan. (I heard from someone else via Twitter about this as well.) This is definitely an important nuance to be aware of (which I was not!).

Leave a Reply

Your email address will not be published. Required fields are marked *

HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>