Push segue transition animation is choppy - ios

Push segue transition animation is somewhat choppy
<- The explanation of the issue in that post states my issue exactly:
"I am using push segue with default animation for transitions on the navigation controller. However, the animation seems to be somewhat choppy. While pushing a new view controller, source view controller shifts left and hangs halfway through. And a moment after this, destination view controller appears."
The storyboard I have is almost like this...
...with the following exception: my master view is a UIViewController consisting of 2 container views, both containing UITableViewControllers, both dynamic tables. Selection from one of the tables pushes the detail view onto the stack (same as the storyboard example above). That push is the "choppy" animation
Like the OP's issue, the master view is shifting left behind the semi-transparent detail view that is shifting into view from the right side of the screen. When the detail view is fully in view, approx half of the master is still in view behind the detail view momentarily, and then it disappears.
All other transitions (push, pop, modals, dismisses, etc) are smooth. This applies only to devices that cannot display both of the split views at the same time, so no iPads.

I also recently had this problem using a Master Detail storyboard with an embedded Navigation Controller. The choppy animation of the segue may have started when I changed the global tint but did not resolve when I changed to back. The issue was fixed when I changed the Background of the View of the Detail screen from Default to a different color. I found it did not make any difference which color as long as it was not Default.

Be sure your UI updates are in the main thread and if the code is already on the main queue then if you using dispatch_async may only going to have overhead. Especially in your prepareForSegue method or in the viewWillAppear there shouldn't be heavy pieces of code (that should stay in the background thread) in main thread that causing this kind of things.

Related

Change detail transition animation UISplitViewController

I have a UISplitViewController. When run in compact mode the detail views are "pushed" onto the navigation stack like pages (with the back button in the navigation bar).
I would like to simply change the page transition animation from a push from the side, to a modal style animation: i.e., have the detail view slide in up from the bottom. But only have it animate as a modal when the UISplitViewController is in compact mode (running on smaller devices - i.e., iPhones, etc).
An image for context:
As you can see, this is a normal page transition, but I would like the detail to slide up like a "page sheet" transition if possible.
I've tried modifying the segue in Main.storyboard however that changes the transition even for regular sizes (i.e., iPads, etc) which makes an additional detail view slide over the side-by-side view that's seen on regular sized devices.
Any help is appreciated!
Although it is doable, I would highly recommend against it. If you still want to go ahead with it, the simplest way would be to create two identical viewControllers with two different segues and segue types. Then you can make a check on device idiom and call the relevant segue. Again, I would not recommend such an approach

Transition of a view controller embedded in a navigation controller

I have a problem with a transition. I am modifying this project https://github.com/xxxAIRINxxx/MusicPlayerTransition in order to have the transition from the right instead of the bottom. This part is fine. My transition comes from the right.
My problem is that I'm embedding the presented modal view controller into a Navigation Controller. I do this so I can use the "pushViewController" function when I click on a cell of my modal view controller.
My hierarchy is as follow. I have a dashboard. From the right, I drag a TableViewController X. If I drag back in the opposite direction, I come back to my dashboard. Fine. Now, If I tap a cell, it pushes a new ViewController Y.
Now, if I am in my new ViewController Y and that I drag back, I come back directly on my dashboard instead of going back to my TableViewController X, as a natural navigation controller should behave.
I did a small project on github that does only that, so you can easily see my entire code.
https://github.com/magohamote/NavigationControllerTransition.git
I understand why it behaves like this, but I would like to know how I can override the transition set on the navigation controller in order to have the normal behaviour of my navigation controller once it is presented.
Another problem I have not been able to solve. On the project I used as a starter (the one from xxxAIRINxxx) the transition is perfectly smooth. On mine, the first time I trigger the transition, it blinks and get stuck. Once I did it once, it is smooth the next time I drag my view. But the first time is always awful. I don't know why either :(
Thank you a lot for your help!

Weird segue transition after disabling autolayout

I don't know how to explain this, it's really strange.
Ok think about two view controllers, the first one is a tableview controller and has a button in his navigation bar connected via push segue to the second view controller.
When pushing the button, the second view controller comes in from the right and at the same time pushes the first view controller out, to the left.
I wasn't using auto layout for my project but I've activated it to test something (I've just activated two constraints for two labels in the prototype cell). Then I've disabled the auto layout and now when I push the button on the first controller the second one comes in, but instead of pushing out the first controller, it slides on the back of the first one, that disappears only when the animation ends.
It's like if all the cells in my first controller become transparent during the transition.
I can't see anything strange in my settings so I don't know how to solve this.
Well, as Ryan said, it was one of those annoying problems where you dig around for 30 (for me it's been 90) minutes with no success and then find out how to fix it with a single click.
It turns out that the second view controller had a transparent background (don't know why), so reverting it to white solved the problem.
Thanks God I din't delete the storyboard to make it ex-novo.

iOS - Keep background animation across view controllers

I'm using a basic UINavigationController design for the settings pages of an app. Each settings page is its own view controller (with xib), and each page has the same background image.
I've since built a view-based animation to replace the background image, and I'd like it to play uninterrupted while the user moves from page to page. In other words, it's as though each settings page had a transparent background, and beneath all of them was a single instance of my animating view.
How would I go about doing this?
So far, I've tried just putting the animation on each page separately, but the transitions look a bit too sloppy for me. I'd also considered somehow having a single UIView with all necessary animations underneath my navigation controller, but not sure a) if that's feasible, and b) how to go about that.
Thanks for reading.
Sounds like you want to be using "Container View Controllers"
You can read up on the Apple documentation here: https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html
The solution would be to have one master view controller which holds onto your settings view controllers. The settings view controllers background is transparent so you see the background of the master view controller.
As for the animation see Listing 14-3 Transitioning between two view controllers on the link I provided you.

iOS Push Navigation Controller, without a bar on the second view

I have an iOS App, designed within a UINavigationController. One of the pushed view controllers, however, needs a full screen view, without the navigation bar on the top. (to get back, there is just a small, circular button). However, any method I've tried of 'hiding' the navigation bar (navigationCtl.navigationBar.hidden=TRUE) leaves me with ugly artifacts - calling that before the view is pushed (in viewDidLoad or viewWillAppear) causes the previous view controllers bar to flash white just as the slide left animation starts. Similarly, calling it in viewDidAppear leaves a white bar at the top of the second view, along with several subviews pushed down, out of the way. Is there any way I can just have the new view slide over as it usually does, but when it comes over, there's simply no navigation bar up top?
Please note, to help Google, essentially the question here is:
How to animate between two UIViewControllers, when one has a navigation bar at the top, and the other one does not have a navigation bar at the top. So, how to navigate from a UIViewController with a navbar to one without a navbar - avoiding the horrible flickering.
The amazing answer is given below by Ev ... awesome.
give this a spin and see how it works for you.
in the destination view controller in viewWillAppear
- (void)viewWillAppear:(BOOL)animated {
[self.navigationController setNavigationBarHidden:YES animated:YES];
}
It actually has a cool effect and can be useful. in the viewWillAppear everything happens before the view is displayed so it takes away the strange artifacts.
be well

Resources