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

  • Home
  • SEARCH
  • 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 8394927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:10:33+00:00 2026-06-09T20:10:33+00:00

In iOS (version 5 is fine), I have a custom animation to flip and

  • 0

In iOS (version 5 is fine), I have a custom animation to flip and zoom an image transitioning from one UIViewController to another using:

TCFlipZoomSubviewSegue segue=[[TCFlipZoomSubviewSegue alloc] initWithIdentifier:@"SegueToMenuTable" source:self.iViewController destination:self.mViewController];
[segue perform];

and in the perform method I have:

[UIView animateWithDuration:3.75f
                      delay:0.0f
                    options:UIViewAnimationOptionAllowAnimatedContent
                 animations:^{
                   self.subviewTransformView.layer.transform=transform;
                 } completion:^(BOOL finished) {
                   [destination.parentViewController.view bringSubviewToFront:destination.view];
                 }

It all works fine, but all sorts of problems occur (layout is messed up) if I rotate the device during the animation. What I want is for the animation to complete before the orientation event occurs – which is the standard behaviour in iPhones – eg try rotating the MAIL app immediately after clicking INBOX – it completes the slide transition then rotates. Same with the Stocks app etc. And that’s what happens if I use a standard Push animation etc. But I have my own animation to do.

So how do they do that?

How do I prevent (ie delay, or block) the orientation change until my animation finishes? I can easily stop the change by saying NO in shouldAutorotateToInterfaceOrientation: when I’m animating but then i need it to do the orientation after. I could call attemptRotationToDeviceOrientation but surely there must be a better way – The segue itself should be able to complete without being interrupted.

  • 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-09T20:10:34+00:00Added an answer on June 9, 2026 at 8:10 pm

    I think the way you mentioned is probably the way you have to do it — that is, return NO to shouldAutorotateToInterfaceOrientation:, and then call attemptRotationToDeviceOrientation when your animation is done. You would probably need some sort of flag that is set if the user tries to rotate while the animation is in progress, so you would know whether you should call attemptRotationToDeviceOrientation when the animation finishes.

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

Sidebar

Related Questions

Using presentModalViewController with UIImagePickerController causing Crash on iOS 5 (its running fine on version<5),
I have been using the MGTwitterEngine and it is working fine on IOS 4.x,
I have this jailbroken iPhone 3G with iOS version 4.2.1 (the latest supported version).
I have created a CustomURLConnection class. If my version of iOS is greater than
I have a Facebook app ID which I'm using on 6 iOS apps for
I created iOS app using PhoneGap version 0.9.6 long back. Now I am going
I have an Xcode 4.3.2 iOS 5.1 project that compiles and runs fine when
We have an app that has crashed on armv6 iOS devices coming from the
I have an iOS app which gets some JSON from a server (in the
I have sucessfully used Farseer to develop one of my game using XNA .

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.