I have looked at multiple stackoverflow posts and googled about it for hours, but can't figure out why transition is so choppy. I am not doing too much work on my main thread, and I am just using some functions to calculate numbers to display in the tableview, which I tried putting on a separate thread, but that didn't help either!
It's choppy when I run it on the simulator and my phone too.
https://recordit.co/S5I772t5t6
Please help!!
Check if the pushed view controller has clear background color, or a background color with alpha < 1. In my experience this might cause the push animation to look odd.
Related
I am facing strange problem in my application. If I am using my Application in a normal way then all the things are going good and transition is smooth when going to next controller or coming from the previous one.
Problem arises when say I launched my application and say I let my application idle for few minutes, it is active not in background then in this case the transition effect is not smooth when going to next screen or coming back to previous one. It feels like my application is going slow,Loader comes in slow motion and hides too, Navigation also seems to be slow. Did anyone faced the same issue like me,if yes please share the solution.
Yesterday I updated my iPhone 5 to iOS 7.1 and found a strange bug in my current application. There is few UINavigationControllers. After few transition in it the animation of transition become to fast, like there is no animation at all. But more strange that all system animation became to fast, default UITableCell animation, modal window animation and so on.
Does someone know what is this? On device with 7.0.6 there is no such problem.
Looks like it starts to happen after few calls of:
[navController setViewControllers:popViewControllers animated:animated];
PS: One more thing - my app is still using iOS 6.1 SDK.
PPS: i don't use custom default animations.
UPDATE: With 7.1 SDK problem still exists.
I have similar problem after updating my iPhone from iOS 7.0.3 to 7.1. I go back and forth several times using the navigation bar and after a few tries there is no transition animation. All animations are broken when it happens, eg. device rotation animation. After reaching this state, few more back and forth transitions cause a crash.
Edit 3:
In my case the problem was because of accessing GUI objects from a background queue. If you experience this issue make sure all GUI objects are accessed from the main thread. Many thanks to Eugene for helping me figure this out.
I have an app that generates a PDF and displays it at the same time. As expected, there is about a 2-second delay between pressing the "Generate PDF" button and the QLPreviewController presenting the document. Not only that, it appears as though the document fades in momentarily, freezes, and then completes the fade-in.
I understand that the reason for the delay is because it is generating the PDF first, but the design of the application doesn't allow for any other mechanism. I was hoping to put a brief "LOADING..." animation before the QLPreviewController view appears, but everything I've tried so far still presents a 2-second delay.
Can anyone provide guidance on what I might be able to do here?
There are lots of options. I'd suggest that whatever you do, it be asynchronous. This will allow for the UI to not 'freeze' and you can put a loading screen up even if it is for 2 seconds.
There are many ways to implement this. Some involve actual background threads and others don't.
You can use, delegates, NSNotifications, blocks, NSOperations, and/or Grand Central Dispatch.
Here's a tutorial on how to use Grand Central Dispatch
Here's a tutorial on blocks
I've gotten some strange behavior lately. All animation suddenly stops working sometimes.
Sometimes everything runs smooth, and other times this happens. Pushing and popping views just snaps into place, UITableView cellrow animation doesn't work.
The app uses a lot of background threads so maybe there is something in there?
I can't really post code since I don't know where the problem is.
Has anyone had the same problem?
Could that be you attempting to update UI/animate in different background threads?
Try?
dispatch_async(dispatch_get_main_queue(), ^{
// code to update ui or start animation
});
I've seen some other solutions, but none of them are working for me.
My app is suddenly returning to a black screen after I use the home button to leave and then return to the program. It briefly shows the screen and then goes black.
There's nothing inside my appDelegate methods related to foreground and background, and I don't know if there's another bit of code that I should be looking for to solve this issue.
What can cause this to happen?
update:
Upon re-entering the foreground I've checked to make sure that all of the views, subviews, layers and sublayers still exist. Calling setNeedsDisplay to all of them from the WillEnterForeground notification does no good.
Looking at the notifications sent out, there is one called
_UIWindowWillDestroyWindowContextNotification
which looks menacing, but I can't find any information about that.
Any pointers about where to look are much appreciated, I've tried everything that seems possibly relevant. Thanks!!
The most probable cause is you're doing something on the main thread. When the app goes black just click pause on the debugger and check the main thread. If you're not doing something on the main thread please tell us what is your app doing when you click pause.