简体   繁体   English

iPhone Storyboard Push速度很慢

[英]iPhone Storyboard Push is Slow

I have a storyboard setup in Xcode for my iPhone app and the first view which loads is a UINavigationController and then from its first view controller I have a button which in Interface Builder I simply connected it to a second view controller. 我在Xcode中为我的iPhone应用程序设置了一个情节提要板,并且加载的第一个视图是UINavigationController,然后从其第一个视图控制器中获得一个按钮,该按钮在Interface Builder中将其简单地连接至第二个视图控制器。 I have a couple of UIImageViews and a UILabel in it, but there is very little going on. 我有几个UIImageViews和一个UILabel,但是几乎没有发生。

My issue being, when I test this on my device (iPhone 4) and I tap that button it takes a good 3-4 seconds to load this new view. 我的问题是,当我在设备(iPhone 4)上对此进行测试时,点击该按钮需要3-4秒的时间才能加载此新视图。

Hope you can resolve this. 希望您能解决这个问题。

Thanks. 谢谢。

Try changing the images that you are loading in the second VC and notice the duration. 尝试更改要在第二个VC中加载的图像,并注意持续时间。

Just in case, try very small size images to know if there is any issue. 为了以防万一,请尝试使用较小尺寸的图像以了解是否存在任何问题。

try to set all your data in 尝试将所有数据设置在

viewDidAppear

don't put in 不要放

viewWillAppear or in ViewDidLoad

Hope This will solve your issue. 希望这能解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM