1

i have six viewControllers and six buttons in my project. every button brings the appropriate ViewController. but the thing is when the user taps for example 4th button then the application freze for one or two seconds and then the requested ViewControl is loaded. all i want to do is to make that things faster. i mean i checked some applications there it was done like first the requested ViewController is brought then it starts to load the controls. how i can do such thing in my application ?

4

1 回答 1

1

使用仪器中的“时间分析器”工具,您可以查看代码中的哪些函数很慢。这应该有助于找出你的代码在哪里变慢了。

例如,如果您将所有视图控制器换成空白控制器,您应该不会看到任何冻结。您的视图控制器初始化代码中的某些内容可能会减慢您的速度。

于 2012-06-04T17:35:51.250 回答