我有視圖控制器與UIImageView。鑑於加載我想要在圖像視圖上設置圖像的特定時間間隔。然後應該清除圖像視圖和應用程序應切換到下一個屏幕。我曾嘗試下面的代碼是不工作:顯示特定時間間隔的圖像
welcomeImage.image=[UIImage imageNamed:@"abc.png"];
sleep(5);
homeScreenController *controller=[[homeScreenController alloc]initWithNibName:@"homeScreenController" bundle:nil];
controller.modalTransitionStyle=UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:controller animated:YES];
在這種情況下,鑑於沒有加載之前它睡覺,它是不會到下一個屏幕也。那麼代碼有什麼問題?