我的客户希望他的飞溅图像淡出,然后显示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. Wifidog不显示飞溅页面
- 3. 用于“飞溅”页面的Swing组件?
- 4. Phonegap建立iOS 6 iphone 5飞溅不会消失
- 5. 不允许旋转飞溅上鉴于iOS的
- 6. 尝试Scrapy +飞溅
- 7. Scrapy,飞溅的Tor
- 8. MonoTouch飞溅推子
- 9. WPF飞溅屏幕,如何使飞溅屏幕显示更长
- 10. 社交引擎网站的飞溅页面
- 11. 飞溅后NullPointer异常
- 12. Scrapy飞溅设置:“SPLASH_URL”
- 13. wxPython中的动画飞溅
- 14. 点击JS链接飞溅
- 15. 问题与Scrapy和飞溅
- 16. Python刮飞溅javascript点击
- 17. 在飞溅期间UIAlert
- 18. Scrapy飞溅多次点击
- 19. Paper.js未来的飞溅
- 20. 飞溅内存限制(scrapy)
- 21. 如何scrapy从飞溅
- 22. 飞溅微调在PhoneGap的2.4
- 23. Backbone Marionette iOS风格的页面转换
- 24. iOS 7像jQuery Mobile的页面转换
- 25. Image.xcassets问题与显示飞溅的设备与iOS 8
- 26. Fadout飞溅屏幕上的多个图像在IOS
- 27. 从通知中心进入前台时显示的IOS飞溅
- 28. 刮飞溅的网页和加载更多按钮
- 29. jQuery的:飞溅页动画序列与URL结尾跳
- 30. 按Scrapy和飞溅单页反应网站后的链接