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 8110367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:43:45+00:00 2026-06-06T01:43:45+00:00

I have UIScrollView and number of objects (UIView compositions) with UIImageViews inside them. Some

  • 0

I have UIScrollView and number of objects (UIView compositions) with UIImageViews inside them. Some of UIImageViews has round border (I use myImageView.layer.masksToBounds = YES; for this). Other has rectangle borders and part of image in them (I use Clip subviews property in Interface Builder for this).

The issue is that I found that clip properties strongly affect the performance while scrolling:

For iPod touch (4th generation) results of profiling:

  • with enabled clip properties (both or one of them) I have around 30 fps while scrolling
  • with disabled clip properties I have all 60 fps while scrolling

I really need to clip some images to round bounds and other to rectangle bounds (to show part of image). So, here is my question: what ways there are to improve performance? May be there are low level ways to do it (drawRect: or something), or may be it would be useful to play around alfa masking or I just do something wrong?

  • 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-06T01:43:46+00:00Added an answer on June 6, 2026 at 1:43 am

    When you have graphically intensive masks and things, a simple and easy way to improve performance (often times dramatically) is to set shouldRasterize to YES on the layer for that item:

    #import <QuartzCore/QuartzCore.h>
    
    // ...
    
    view.layer.shouldRasterize = YES;
    

    This will rastersize the view into a buffer, so it isn’t constantly re-rendered. This will take up a extra memory for each view, so you should really try and recycle/reuse views as you scroll, similar to how a table view does.

    For correct behaviour on retina display you also need to set an appropriate value for rasterizationScale:

    view.layer.rasterizationScale = view.window.screen.scale; // or [UIScreen mainScreen]
    

    I’ve had great success with this for things like scrolling photo galleries, where each item had rounded corners, shadows, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIScrollView with a UIView inside. I want to lock the x-axis
I have this UIScrollView inside another UIView, not occuping the entire area (all this
I have a UIScrollView with 2 pages, and I can scroll horizontally between them.
i have an uiscrollview with a uiimageview inside. I subclass the uiscrollview but i
I'm resizing a UIView and a UIScrollView based on the number of pixels that
I have n number of UITextview and that are added to UIScrollview.and uiscrollview is
I have UIScrollView with multiple UIVIew subviews. I would like to update the data
I have a UIScrollView which contains a sub-UIView, insetView which is used to display
I have a Paging UIScrollView with a contentSize large enough to hold a number
I have a UIScrollView which contains any number of thumbnails that should detect the

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.