问题
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