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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:13:09+00:00 2026-05-29T10:13:09+00:00

In my app when I am switching views with an animation using UIView animations,

  • 0

In my app when I am switching views with an animation using UIView animations, it does not show anything, the view is black but I know my method is getting called. I have NSLogged where the view is and I printed the results and posted them below.

My code is below, but does anyone see anything that is wrong?

-(void)changeView2ToView3 {
    NSLog(@"Before, frame= %@", NSStringFromCGRect(view3.view.frame));

    [view2.view.superview addSubview:view3.view];
    [view3.view setFrame:CGRectMake(0, kHeight, kWidth, kHeight)];
    [UIView animateWithDuration:0.75 
                     animations:^{
                         [view3.view setFrame:CGRectMake(0, 0, kWidth, kHeight)];  
                     }
                     completion:^(BOOL finished){
                         [view2.view removeFromSuperview];
                     }];
    NSLog(@"Before, frame= %@", NSStringFromCGRect(view3.view.frame));
}

kHeight and kWidth are the height and width of the screen and they are never 0 or nil.

Also this is what is printed from the console:

2012-02-02 15:58:30.449 App[27578:707] Before, frame= {{0, 0}, {320, 480}}
2012-02-02 15:58:30.452 App[27578:707] Before, frame= {{0, 0}, {320, 480}}
2012-02-02 15:58:36.234 App[27578:707] Before, frame= {{0, 0}, {320, 480}}
2012-02-02 15:58:36.237 App[27578:707] Before, frame= {{0, 0}, {320, 480}}

Thanks!

  • 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-29T10:13:10+00:00Added an answer on May 29, 2026 at 10:13 am

    A similar thing is happening to me with an app I’m working on. I think what’s wrong with yours is that you didn’t specify a height or width, they are both 0? Correct me if I am wrong.

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

Sidebar

Related Questions

In my app when I am switching views with an animation using UIView animations,
Currently I am having a issue switching views using Core Animation. I want to
I'd like to add a UINavigationController to my app info view (NOT to my
In order to switch between views in my iOS app, I have been using
In my app when I am switching views, after about the 4th time I
My app is document-based, but the document consists of two folders, not one file.
I have two views of some data: a list view (a ListBox now, but
When Switching between two view controllers, what's the difference between addSubView or using a
I'm having trouble switching views with button presses in my Android app. The code
In my app I want to add a custom transition when switching views. Since

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.