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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:20:30+00:00 2026-05-18T20:20:30+00:00

I’m wanting to know if there’s a way I can transform my view to

  • 0

I’m wanting to know if there’s a way I can transform my view to look something like iPhone folders. In other words, I want my view to split somewhere in the middle and reveal a view underneath it. Is this possible?

alt text

EDIT:
Per the suggestion below, I could take a screenshot of my application by doing this:

UIGraphicsBeginImageContext(self.view.bounds.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

Not sure what to do with this, however.

EDIT:2
I’ve figured out how to add some shadows to my view, and here’s what I’ve achieved (cropped to show relevant part):

alt text

EDIT:3

http://github.com/jwilling/JWFolders

  • 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-05-18T20:20:31+00:00Added an answer on May 18, 2026 at 8:20 pm

    the basic thought will be to take a picture of your current state and split it somewhere. Then animate both parts by setting a new frame. I don’t know how to take a screenshot programmatically so I can’t provide sample code…

    EDIT: hey hey it’s not looking great but it works ^^

    // wouldn't be sharp on retina displays, instead use "withOptions" and set scale to 0.0
    // UIGraphicsBeginImageContext(self.view.bounds.size);
    UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *f = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    CGRect fstRect = CGRectMake(0, 0, 320, 200);
    CGRect sndRect = CGRectMake(0, 200, 320, 260); // was 0,200,320,280
    
    
    CGImageRef fImageRef = CGImageCreateWithImageInRect([f CGImage], fstRect);
    UIImage *fCroppedImage = [UIImage imageWithCGImage:fImageRef];
    CGImageRelease(fImageRef);
    
    CGImageRef sImageRef = CGImageCreateWithImageInRect([f CGImage], sndRect);
    UIImage *sCroppedImage = [UIImage imageWithCGImage:sImageRef];
    CGImageRelease(sImageRef);
    
    
    UIImageView *first = [[UIImageView alloc]initWithFrame:fstRect];
    first.image = fCroppedImage;
    //first.contentMode = UIViewContentModeTop;
    UIImageView *second = [[UIImageView alloc]initWithFrame:sndRect];
    second.image = sCroppedImage;
    //second.contentMode = UIViewContentModeBottom;
    
    UIView *blank = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 460)];
    blank.backgroundColor = [UIColor darkGrayColor];
    
    [self.view addSubview:blank];
    [self.view addSubview:first];
    [self.view addSubview:second];
    
    [UIView animateWithDuration:2.0 animations:^{
        second.center = CGPointMake(second.center.x, second.center.y+75);
    }];
    

    You can uncomment the two .contentMode lines and the quality will improve but in my case the subview has an offset of 10px or so (you can see it by setting a background color to both subviews)

    //EDIT 2: ok found that bug. Had used the whole 320×480 screen, but had to cut off the status bar so it should be 320×460 and all is working great 😉

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.