为iOS App增加启动渐变效果
来源:互联网 发布:滨州行知中学招生电话 编辑:程序博客网 时间:2024/05/21 19:38
由于目前苹果没有支持该功能,所以只能自己在App启动后做一个过度效果:
[cpp]
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
UIImageView *splashScreen = [[[UIImageView alloc] initWithFrame:self.window.bounds] autorelease];
splashScreen.image = [UIImage imageNamed:@"Default"];
[self.window addSubview:splashScreen]; www.2cto.com
[UIView animateWithDuration:1.0 animations:^{
CATransform3D transform = CATransform3DMakeScale(1.5, 1.5, 1.0);
splashScreen.layer.transform = transform;
splashScreen.alpha = 0.0;
} completion:^(BOOL finished) {
[splashScreen removeFromSuperview];
}];
return YES;
}
其实我觉得这个功能最好是用在两个界面进行切换时使用,而且其中的黑屏效果如果使用view.backgroundcolor=[uicolor blackcolr];这样就不需要一个图片来做这种切换效果,速度更快,占空间更小。
0 0
- 为iOS App增加启动渐变效果
- 为iOS App增加启动渐变效果
- 为iOS App增加启动渐变效果
- 为iOS App增加启动渐变效果
- 为iOS App增加启动渐变效果
- 为iOS App增加启动渐变效果
- 为iOS App增加启动动画效果
- iOS应用启动页的渐变效果
- 用动画实现android app启动界面的渐变效果
- ios 颜色渐变效果
- iOS颜色渐变效果
- iOS 开发--渐变效果
- ios 判断app是否为第一次启动
- iOS: 为画板App增加 Undo/Redo(撤销/重做)操作
- iOS: 为画板App增加 Undo/Redo(撤销/重做)操作
- iOS开发 颜色渐变效果
- iOS文字渐变效果实现
- UITableView下拉色彩渐变,图片变大效果(模仿链家网iOS APP首页)
- 13.jQuery UI 选项卡UI
- iPhone开发中的技巧整理
- ZOJ1453
- 配置Spring数据源c3p0与dbcp
- linux 操作系统NTP客户端配置
- 为iOS App增加启动渐变效果
- Mongodb 客户端基本使用
- Apache Xerces2 Java
- leetcode 刷题之路 74 Construct Binary Tree from Preorder and Inorder Traversal
- java多线程和线程池
- C语言在32位和64位系统上各类型所占字节数
- java中遍历属性字段及值
- 【最大流-ISAP】POJ-1273-网络流模板!!
- mylinklist