开发者

Hiding all objects upon return to MainView

开发者 https://www.devze.com 2023-03-29 07:58 出处:网络
in a utility application, in the viewDidLoad method, I have the following functions, among others: [self hideObjects];

in a utility application, in the viewDidLoad method, I have the following functions, among others:

[self hideObjects];
[self setColorAndSizes];
[self fadeInEverything];

These three methods, combined, first hide all objects on the screen, then adjust the sizes and colors appropriately, and then fade each of them into view, one at a time. Now, when the user goes to the FlipsideView, then returns to the MainView, although I have the 开发者_Go百科same three functions in viewDidAppear, all of the objects appear for maybe half a second, then disappear, and fade in. Why don't the hide immediately, like they do in the viewDidLoad method?


viewDidLoad is called when the view loads. However, in a utility application that has the flip, when the app flips to reveal the backside, MainView really never goes away. All you're doing when you hit the back button is DISMISSING the FlipsideView. MainView appears again, but isn't loaded. Do you see this code in MainView.m? This is why:

- (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller {

        [self dismissModalViewControllerAnimated:YES];
}
0

精彩评论

暂无评论...
验证码 换一张
取 消