Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7819587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:00:35+00:00 2026-06-02T07:00:35+00:00

QuartzCore .layer.shadow’s suck up performance. They appear to need to be re-rendered every time

  • 0

QuartzCore .layer.shadow’s suck up performance. They appear to need to be re-rendered every time something changes, causing everything to lag.

Coregraphics gradient (for 1 way shadows) – doesn’t look right. if your gradient goes from 0.3 alpha to 0, it has some odd effect where you can ‘see’ it stop. It just doesn’t look nice, or natural. Maybe it isn’t dithered, but I’m sure I heard core graphics gradients are. It’s odd, I don’t know.

Coregraphics shadow – take a while to render as you set them, but otherwise great performance. It’s just that second you’re waiting for a view to appear because it has to render it’s shadow first, that’s the problem.

So I must be missing something. Is there another method which looks right, and is speedy both in rendering time and in performance?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:00:36+00:00Added an answer on June 2, 2026 at 7:00 am

    Adding a shadowPath should give you a huge performance boost. The following example assumes you only want the shadow on the sides of your view

    CGPathRef path = [UIBezierPath bezierPathWithRect:view.bounds].CGPath;
    [view.layer setShadowPath:path];
    

    EDIT:
    On default a CALayer draws a shadow during animations, the following code allows you to cache the shadow as a bitmap and reuse it instead of redrawing it:

    self.view.layer.shouldRasterize = YES;
    // Don't forget the rasterization scale
    // I spent days trying to figure out why retina display assets weren't working as expected
    self.view.layer.rasterizationScale = [UIScreen mainScreen].scale;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read several posts already. And almost everyone suggest using QuartzCore/QuartzCore.h with layer.cornerRadius
I'm trying to draw a custom-shaped shadow using CALayer : #import <QuartzCore/QuartzCore.h> @implementation ZKSBAppDelegate
I've included: #import QuartzCore/QuartzCore.h but when I try to build, I get the error
I have added the <QuartzCore/QuartzCore.h> to my Frameworks folder in my iPhone project and
I have the following code: CATextLayer *test = [CATextLayer layer]; test.string = summary; test.wrapped
Here is the problem... I am using CA Tiled Layer to display a large
I'm trying to get my head around using QuartzCore to render semi-complex text/gradient/image UITableViewCell
In Mac OS X Lion CARemoteLayerServer and CARemoteLayerClient were added to QuartzCore. I've been
Have two IBOutlets which won't appear in File's Owner to connect to even though
I have some development experience of CocoaTouch Layer, Core Service Layer iPhone Applications. Now,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.