2011-07-28 55 views
0

我在我的项目的页数上有一个共同的图像,所以我将该图像放在窗口文件上。由于有些页面不需要显示该图像,所以我将该图像隐藏在相应的页面上。如何在页面加载时隐藏几毫秒的图像。

现在问题出现了,当我从非图像页面弹出到包含图像的页面时,该图像在加载整个页面之前显示。

我希望该图像只在整个页面加载时才显示。

任何帮助表示赞赏....我firstViewController的

代码:

ProfileViewController *ProfilePage = [[ProfileViewController alloc] initWithNibName:@"ProfileViewController" bundle:nil]; 
ProfilePage.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;  
UINavigationController *navigationControllerNew = [[UINavigationController alloc] initWithRootViewController:ProfilePage]; 
//Present navigationController as Model viw controller 
[self.navigationController presentModalViewController:navigationControllerNew animated:YES];   
//release it After presenting to it 
[navigationControllerNew release]; 
[ProfilePage release]; 

ProfileViewController页,我的隐藏图像与下面的代码上:

[super viewWillAppear:animated]; 

IQ_TestAppDelegate *appDelegate = (IQ_TestAppDelegate *)[[UIApplication sharedApplication] delegate]; 
[appDelegate removeImageViewLogo]; 

这怎么我打电话给我的网页....

编辑:我已经使用NSTimer,这样图像隐藏了一些毫秒,但正如我告诉我把该图像放在窗口文件中,它显示在页面加载的开始,不知道笏做....

请帮助。

+0

你是通过xml解析来填充你的视图吗? – Maulik

+0

不,我只是弹出我的页面,因为我把页面推到非图像页面。 –

回答

2

您应该尝试在控制器的viewDidLoad方法中显示(显示)图像。

如果您有一个模型异步加载一些数据,那么您应该只在该过程结束时才能看到图像。

如果您提供更多详细信息,特别是“整个页面已加载”的含义,我可以进一步提供帮助。