我希望啓動後的圖像在眨眼一秒後消失。每次啓動時都會生成圖像視圖
所以上的.xib的頂部我把與飛濺圖像的實際初始屏幕顯示,則當XIB裝載有相同的圖像的圖像視圖中示出的圖像視圖,(
第一,使它看起來像它一樣閃屏
)
我使用ViewController.m這個代碼褪色的圖像
[UIImageView beginAnimations:nil context:NULL];
[UIImageView setAnimationDuration:1.0];
[ImageLoading setAlpha:0];
[UIImageView commitAnimations];
這有效,但如果用戶轉到另一個xib並稍後切換回來,它會再次顯示1秒的啓動畫面。
我Viewcontroller.m
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[UIImageView beginAnimations:nil context:NULL];
[UIImageView setAnimationDuration:1.0];
[ImageLoading setAlpha:0];
[UIImageView commitAnimations];
return YES;
}
試過,但顯然它不獲取調用。
還有什麼其他的方法可以讓這個圖像視圖在啓動時消失嗎?
非常感謝,
這將只顯示爲Default.png一秒,不溶解的動畫我去了:) –