views:

21

answers:

2

I have a view that I am presenting modally. For some reason it animates very slowly.

[self.parentViewController.tabBarController presentModalViewController:browser animated:TRUE];

I'm not sure why? I have even tried:

[self presentModalViewController:browser animated:TRUE];

UPDATE: The UITableViewController that is presenting it, is drawing custom UITableViewCell's that have images with rounded corners. Not sure if that makes a difference.

A: 

There's so setting for the animation speed. It's all native. The only time I have noticed this is when my device was running slowly. Try it in the simulator versus the iPhone. In addition, may sure you are not debugging as that will eat resources.

If it is still slow, I would wonder what your model view controller is loading - i.e. large nib or viewDidLoad?

Jason McCreary
just loading a UIWebView that is loading a webpage
Sheehan Alam
Seems simple enough. Try on the device with WiFi enabled. I'm wondering if the loading of the page is causing the animation to lag.
Jason McCreary
+1  A: 

If it takes more than a couple seconds to load the new view controller, try running on the device with Instruments. After you've built the binary, go to the Run-> Run with Performance Tool-> CPU Sampler and do what you're doing that seems slow. You might want to do it several times to make sure Instruments gets enough data. Then stop the data collection in Instruments and see where in your code it's slow.

lucius