我的客戶希望他的飛濺圖像淡出,然後顯示UI。我不知道如何做到這一點。截至目前它剛剛出現一次它加載。有沒有簡單的方法來做到這一點?iOS 5飛濺頁面轉換
1
A
回答
3
UIImageView *splash=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"splash"]];
[UIView animateWithDuration:1
animations:^{
splash.alpha = 0.0;
}
completion:^(BOOL finished)
{
[splash release];
}];
1
我一直在尋找這個教程,但決定不來實現它,所以我不能擔保其是否工作或沒有,但一切看起來都在檢查
http://www.dobervich.com/2010/10/22/fade-out-default-ipad-app-image-with-proper-orientation/
要小心的是增加了很多你的應用程序啓動是應用程序拒絕的理由。
避免顯示關於窗口或啓動畫面。通常,請嘗試使用 以避免提供任何類型的啓動體驗,以防止人們立即使用您的應用程序。
1
正如我在closely related question剛纔解釋,不要使用閃屏!請將此與您的客戶聯繫起來,他們可能不熟悉人機界面指南。這就是說,如果你不能說服你的客戶,否則,你可以淡出UIImageView,我在我的另一個迴應中提到。
1
您可以實現自己的UIViewController
作爲一個閃屏:
@interface SplashScreenViewController : UIViewController {
UIImageView *splashView;
}
@end
//
#import "SplashScreenViewController.h"
@implementation SplashScreenViewController
#pragma mark - View lifecycle
- (void)loadView {
self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
[splashView setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
[self.view addSubview:splashView];
}
- (void)viewWillAppear:(BOOL)animated {
if (isIPad) {
if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]))
splashView.image = [UIImage imageNamed:@"Default-Portrait~ipad.png"];
else
splashView.image = [UIImage imageNamed:@"Default-Landscape~ipad.png"];
}
else
splashView.image = [UIImage imageNamed:@"Default.png"];
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
if (isIPad) {
if (UIInterfaceOrientationIsPortrait(toInterfaceOrientation))
splashView.image = [UIImage imageNamed:@"Default-Portrait~ipad.png"];
else
splashView.image = [UIImage imageNamed:@"Default-Landscape~ipad.png"];
}
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (isIPad ? YES : UIInterfaceOrientationIsPortrait(interfaceOrientation));
}
@end
然後,顯示後,可以隱藏這個UIViewController
你想要的任何過渡。
相關問題
- 1. 「飛濺頁面」NOT index.asp
- 2. 中飛濺頁
- 3. 用於「飛濺」頁面的Swing組件?
- 4. Wifidog不顯示飛濺頁面
- 5. Phonegap建立iOS 6 iphone 5飛濺不會消失
- 6. 飛濺在iOS應用程序
- 7. 不允許旋轉飛濺上鑑於iOS的
- 8. MonoTouch飛濺推子
- 9. 嘗試Scrapy +飛濺
- 10. Scrapy,飛濺的Tor
- 11. WPF飛濺屏幕,如何使飛濺屏幕顯示更長
- 12. Ionic2飛濺屏幕不顯示飛濺圖標
- 13. 社交引擎網站的飛濺頁面
- 14. 飛濺頁面:電子郵件收集(Rails 3.2)
- 15. 如何擺脫鐵路路由器飛濺頁面
- 16. Scrapy飛濺設置:「SPLASH_URL」
- 17. 點擊JS鏈接飛濺
- 18. 飛濺後NullPointer異常
- 19. Paper.js未來的飛濺
- 20. 飛濺內存限制(scrapy)
- 21. 問題與Scrapy和飛濺
- 22. 完成飛濺活動?
- 23. 在飛濺期間UIAlert
- 24. Durandal SPA飛濺百分比
- 25. Scrapy飛濺多次點擊
- 26. 使用scrapyjs抓取飛濺
- 27. 如何scrapy從飛濺
- 28. 飛濺屏幕上的Videoview
- 29. wxPython中的動畫飛濺
- 30. 爲Default.png飛濺屏幕(iphone)