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

The Archive Base Latest Questions

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

Im currently working on an universal app, and in one of my view controllers

  • 0

Im currently working on an universal app, and in one of my view controllers i have the following xib:

View
 -ImageView
 -TableView
 -ImageView
 -View (called tblviewContainer in the following snippet of code)

In my viewdidload method i have made an layer which i will put on my view(tblviewcontainer) so that some of the top and the bottom of the screen is gradient.

[tblViewContainer addSubview:self.tableView];
[tblViewContainer sendSubviewToBack:self.tableView];

if (!maskLayer)
{
    maskLayer = [CAGradientLayer layer];

    UIColor* outerColorSetup = [UIColor colorWithWhite:1.0 alpha:0.0];
    UIColor* innerColorSetup = [UIColor colorWithWhite:1.0 alpha:1.0];

    CGColorRef outerColor = outerColorSetup.CGColor;
    CGColorRef innerColor = innerColorSetup.CGColor;

    maskLayer.colors = [NSArray arrayWithObjects:
                         (__bridge id )outerColor,
                         (__bridge id)innerColor,
                         (__bridge id)innerColor, 
                         (__bridge id)outerColor, nil];

    maskLayer.locations = [NSArray arrayWithObjects:
                           [NSNumber numberWithFloat:0.01],
                           [NSNumber numberWithFloat:0.04],
                           [NSNumber numberWithFloat:0.8],
                           [NSNumber numberWithFloat:1.0], nil];

    maskLayer.bounds = CGRectMake(0, 0,
                                  self.tableView.frame.size.width,
                                  self.tableView.frame.size.height);

    maskLayer.anchorPoint = CGPointZero;

    tblViewContainer.layer.mask = maskLayer;

}

In my app it is possible to rotate, and when i do that with the layer on, it is very slow/laggy when i rotate (only on ipad 3!).

When i rotate i do the following: (from portrait->landscape)

-(void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration
{
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown)
    {

    }
    else if(orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight)
    {
        _landscape = [[ipad_VideoListViewController_Landscape alloc] initWithNibName:@"ipad_VideoListViewController_Landscape" bundle:nil];
        _landscape.scroolViewContentOffset = scroolViewContentOffset;
         [self.view.layer setRasterizationScale:[UIScreen mainScreen].scale];
          self.view.layer.shouldRasterize = YES;


        NSMutableArray *viewCons = [[[self navigationController]viewControllers] mutableCopy];
        [viewCons removeLastObject];
        [viewCons addObject:_landscape];
        [[self navigationController]setViewControllers:viewCons animated:NO];
    }
}

Worst part is it works flawlessly on the ipad 2 with the layer active, but ipad 3 cant seem to handle it. It even seems that the things i do with animation on ipad 2 (which works), cant be handle on the ipad 3. E.g. i made my own tableview header cells / tableview cells, and they also lag if i use them on ipad 3.

Any help would be appreciated!

  • 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-12T01:45:40+00:00Added an answer on June 12, 2026 at 1:45 am

    I added some transparent images instead and its running smooth.

    Still, if anyone know why this does not work, i would like to know.

    Had to find this solution, because i have a deadline :).

    And thanks for the comment Michael!

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

Sidebar

Related Questions

I have a universal binary application and currently working on the iPad version of
I'm working on a universal iOS app and wanting to use different xib files
I am working within an Universal app supporting both iPhone and iPad. I currently
Currently working with the following package structure: /package __init__.py final.py /write __init__.py write.py /data
I'm working on an iPhone application (not an universal one). When I launch this
Im currently working on a project that requires the following. I need to be
Our team is currently working on completely redesigning our school's website and one of
Currently working on a snippet to input variables in which a user changes a
Currently working on trying to figure out asynchronous submission in ColdFusion. I always have
Currently working on a pretty basic hosted PHP app which I'm in the process

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.