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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:07:02+00:00 2026-06-12T15:07:02+00:00

I have a UIScrollView which contains various subviews ( UIImageViews , UILabels and standard

  • 0

I have a UIScrollView which contains various subviews (UIImageViews, UILabels and standard UIViews). Some of the UIImageViews are partially covered by other UIViews.

However, when I fade out the UIScrollView, the partially covered parts of the UIImageViews are being exposed for the brief moment of the animation.

I want to be able to fade the scrollview and all it’s contents at the same time in the same animation – i.e. not revealing any of the partially covered images.

If it’s not possible, I can always add a UIView on top of all the other controls and fade it from alpha 0 upto 1 to hide everything, but I’m sure there’s a way to perform a complete fade on a view and all it’s subviews.

I tried this:

[UIView beginAnimations:nil context:NULL];
[scrollViewResults setAlpha:0.0f];
[UIView commitAnimations];

And I’ve tried this:

- (IBAction)questionGroupChanged:(UIButton*)sender {
    [UIView beginAnimations:nil context:NULL];
    [self fadeViewHierarchy:scrollViewResults toAlpha:0.0f];
    [UIView commitAnimations];
}

- (void)fadeViewHierarchy:(UIView*)parentView toAlpha:(float)alpha {
    [parentView setAlpha:alpha];
    for (UIView *subView in parentView.subviews) {
        [self fadeViewHierarchy:subView toAlpha:alpha];
    }
}

But I’ve still not cracked it. Any ideas?

  • 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-12T15:07:04+00:00Added an answer on June 12, 2026 at 3:07 pm

    This happens because of the way the compositor works. You need to enable rasterization on the view’s layer when fading it in/out:

    view.layer.shouldRasterize = YES;
    

    You should probably only enable this for the duration of the animation because it will take up some extra memory and graphics processing time.

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

Sidebar

Related Questions

I have a zooming UIScrollView that contains a UIView which contains some custom UIViews
I have a UIScrollView which contains multiple UIImageViews. I want to know which UIImageView
I have a UIScrollView which contains many UIImageView s, UILabels, etc... the labels are
I have a UIScrollView which contains some small UIView subclass. UIScrollView is scroll enabled,
Right now I have an UIScrollView, which has a lot of UIImageViews, UILabels and
I have a UIScrollView that contains multiple UITableViews horizontally - all of which are
I have UIScrollView which i populate with UIImageViews programmatically. After that I change contentSize
I have UIScrollView and number of objects (UIView compositions) with UIImageViews inside them. Some
I have a UIScrollView which contains any number of thumbnails that should detect the
I have a pretty big uiscrollview (1700p) which contains a uiimageview as the background,

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.