Load new view when UIProgressView is full

余生长醉 提交于 2019-12-13 02:39:05

问题


So I have a UIProgressView that works as a sort of loading bar. The parent UIView is inside a navigation controller, and when the UIProgressView is full, I want to go to the next view in the navigation hierarchy. Any tips on how to do this?


回答1:


Your progress view is probably being filled periodically by an NSTimer, correct?

Let's say you want to fill it in ten parts over the course of ten seconds.

Each NSTimer tick would add:

progress = progress + 0.1;
if (progress == 1.0) {
[self.navigationController pushViewController:viewController animated:YES];
}

Where progress is whatever controls the fill rate of your UIProgressView and viewController is your viewController.




回答2:


[ self.navigationController pushViewController:yourViewController animated:YES ]; ?



来源:https://stackoverflow.com/questions/11569200/load-new-view-when-uiprogressview-is-full

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!