iOS 9 Orientation Auto-Rotation Animation Not Working, But Always on Main Thread
iOS 9.0 (13A340)
Xcode 7.0 (7A220)
OS X 10.10.5 (14F27)
I have a situation where if I rotate the simulator or device (using iPhone 6s sim and iPhone 6+ device), the animation does not also take place. I am unsure of why this is happening. I am not doing anything unusual or crazy with any
UIKit methods, and I am not calling any method not on the main thread. Additionally, other
UIView animations I have added appear to work just fine. It is just the rotation that’s broken. Other apps seem fine. I’m not sure what I could be doing wrong.
Attempts to figure out/solve:
- Used this extension by Cocoanetics to attempt to see if any
UIKitexecution was not on the main thread.
- Printed out the value of
UIView.areAnimationsEnabled()during multiple spots in program execution. It always printed
UIView.setAnimationsEnabled(true)did not fix.
I am using a custom “nav” view controller (one I made): SASlideDrawer (Note I am not experiencing this same issue with this project alone)
4 Solutions Collect From Internet About “iOS 9 Orientation Auto-Rotation Animation Not Working, But Always on Main Thread”
In my case I had target’s “Main Interface” set and in
application:didFinishLaunchingWithOptions: I have been creating new window and new rootViewController
I’m instantiating my own view controller stack of a navigation controller in app delegate. I fixed the problem by removing the Main interface from the project file.
I’m facing a similar bug.
The rotation animation occurs for the status bar (which has the clock and the battery icon), but the view itself just changes size, it doesn’t do the page flip animation.
This is somewhat repeatable- at first, the rotation occurs correctly, but after I programmatically change the tab view controller index, it can trigger. After it triggers, the rotation animation does not occur for the view until after I reset the app.
Code where I change the tab view controller and then change it back:
[appDelegate.tabBarController setSelectedIndex:0]; ...code to operate on the code at index 0... [appDelegate.tabBarController setSelectedIndex:2];
I did change the general setting, and solved this by deleting the Main Interface and Launch Screen File to empty.
- Pedometer in the Background
- Facebook connect Batch requests and FQL error problem
- Sharing classes between projects in xcode/objective-c
- Disabling a specific warning in a specific line in Xcode
- Tips for transitioning from Emacs to Xcode
- What is the difference between a Development Provisioning Profile and an Ad Hoc Provisioning Profile?
- How to return an inout (reference) in a swift function?
- No suitable records were found verify your bundle identifier is correct
- Making a CocoaPod from an existing Xcode project
- iOS – best practice to send incoming call notifications on VoIP app
- po in LLDB with swift
- Dynamic forwarding: suppress Incomplete Implementation warning
- Xcode A+ source control symbol
- Available Fonts on iOS
- Cannot invoke setValue with an argument list of type (Int64, String)