//
//  AppDelegate.m
//  开场动画demo
//
//  Created by ZFJ_APPLE on 16/1/25.
//  Copyright © 2016年张福杰. All rights reserved.
//#import "AppDelegate.h"@interface AppDelegate ()@property (strong,nonatomic) UIImageView *splashView;//开场动画的背景图片@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {// Override point for customization after application launch.//这是开场动画函数[selfsetStartAnimation];return YES;
}#pragma mark - 设置启动动画
- (void)setStartAnimation
{[self.windowmakeKeyAndVisible];_splashView = [[UIImageViewalloc]initWithFrame:self.window.bounds];[_splashViewsetImage:[UIImageimageNamed:@"4.png"]];[self.windowaddSubview:_splashView];[self.windowbringSubviewToFront:_splashView];//设置动画[selfperformSelector:@selector(scale_1)withObject:nilafterDelay:0.0f];[selfperformSelector:@selector(scale_2)withObject:nilafterDelay:0.5f];[selfperformSelector:@selector(scale_3)withObject:nilafterDelay:1.0f];[selfperformSelector:@selector(scale_4)withObject:nilafterDelay:1.5f];[selfperformSelector:@selector(scale_5)withObject:nilafterDelay:2.0f];[selfperformSelector:@selector(showWord)withObject:nilafterDelay:2.5f];
}- (void)scale_1
{NSLog(@"1-%@",[NSThreadcurrentThread]);UIImageView *round_1 = [[UIImageViewalloc]initWithFrame:CGRectMake(100,240, 15, 15)];round_1.image = [UIImageimageNamed:@"3.jpg"];[_splashView addSubview:round_1];[self setAnimation:round_1];
}- (void)scale_2
{NSLog(@"2-%@",[NSThreadcurrentThread]);UIImageView *round_2 = [[UIImageViewalloc]initWithFrame:CGRectMake(105,210, 20, 20)];round_2.image = [UIImageimageNamed:@"3.jpg"];[_splashView addSubview:round_2];[self setAnimation:round_2];
}- (void)scale_3
{NSLog(@"3-%@",[NSThreadcurrentThread]);UIImageView *round_3 = [[UIImageViewalloc]initWithFrame:CGRectMake(125,170, 30, 30)];round_3.image = [UIImageimageNamed:@"3.jpg"];[_splashView addSubview:round_3];[self setAnimation:round_3];
}- (void)scale_4
{NSLog(@"4-%@",[NSThreadcurrentThread]);UIImageView *round_4 = [[UIImageViewalloc]initWithFrame:CGRectMake(160,135, 40, 40)];round_4.image = [UIImageimageNamed:@"3.jpg"];[_splashView addSubview:round_4];[self setAnimation:round_4];
}- (void)scale_5
{UIImageView *heart_1 = [[UIImageViewalloc]initWithFrame:CGRectMake(130,180, 100, 100)];heart_1.image = [UIImageimageNamed:@"3.jpg"];[_splashView addSubview:heart_1];[self setAnimation:heart_1];
}- (void)showWord
{UIImageView *word_ = [[UIImageViewalloc]initWithFrame:CGRectMake(75,440, 170, 170)];word_.image = [UIImageimageNamed:@"3.jpg"];[_splashView addSubview:word_];word_.alpha = 0.0;[UIViewanimateWithDuration:1.0fdelay:0.0foptions:UIViewAnimationOptionCurveLinearanimations:^{word_.alpha = 1.0;}completion:^(BOOL finished){// 完成后执行code[NSThreadsleepForTimeInterval:1.0f];[_splashViewremoveFromSuperview];}];
}- (void)setAnimation:(UIImageView *)nowView
{[UIViewanimateWithDuration:0.6fdelay:0.0foptions:UIViewAnimationOptionCurveLinearanimations:^{// 执行的动画code[nowView setFrame:CGRectMake(nowView.frame.origin.x- nowView.frame.size.width*0.1, nowView.frame.origin.y-nowView.frame.size.height*0.1, nowView.frame.size.width*1.2, nowView.frame.size.height*1.2)];}completion:^(BOOL finished){// 完成后执行code[nowView removeFromSuperview];}];}- (void)applicationWillResignActive:(UIApplication *)application {// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}- (void)applicationDidEnterBackground:(UIApplication *)application {// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}- (void)applicationWillEnterForeground:(UIApplication *)application {// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}- (void)applicationDidBecomeActive:(UIApplication *)application {// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}- (void)applicationWillTerminate:(UIApplication *)application {// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}@end

iOS-OC-APP开场动画相关推荐

  1. (二十三)Animator 实例 —— 开场动画

    版权声明:本文为博主原创文章,未经博主允许不得转载. 本文纯个人学习笔记,由于水平有限,难免有所出错,有发现的可以交流一下. 一.效果 这个是国外的一个 App 开场动画,曾获得设计大奖 . 二.分析 ...

  2. IOS重写unity Splash,消除黑屏,播放开场动画视频

    IOS重写unity Splash,消除黑屏,自定义开场动画视频,无需破解 此教程只使用于unity5.x系列,2018请看我新发的教程 因为自己使用的unity是免费版,无法去除splash,所以在 ...

  3. 【如何快速的开发一个完整的iOS直播app】(采集篇)

    前言 在看这篇之前,如果您还不了解直播原理,请查看这篇文章如何快速的开发一个完整的iOS直播app(原理篇) 开发一款直播app,首先需要采集主播的视频和音频,然后传入流媒体服务器,本篇主要讲解如何采 ...

  4. Android--制作开场动画/MediaPlayer.OnCompletionListener

    我们在玩游戏的时候常常会现有一个开场动画,要实现这个并不难,下面将给出一个实例实现开场动画. 这个实例需要两个Activity,一个作为开场动画,一个是主程序界面,由于并不需要演示其他的东西,所以在第 ...

  5. Android--制作开场动画/MediaPlayer OnCompletionListener

    我们在玩游戏的时候常常会现有一个开场动画,要实现这个并不难,下面将给出一个实例实现开场动画. 这个实例需要两个Activity,一个作为开场动画,一个是主程序界面,由于并不需要演示其他的东西,所以在第 ...

  6. iOS:app直播---采集篇

    [如何快速的开发一个完整的iOS直播app](采集篇) 转载自简书@袁峥Seemygo:http://www.jianshu.com/p/c71bfda055fa 前言 开发一款直播app,首先需要采 ...

  7. iOS - Core Animation 核心动画

    1.UIView 动画 具体讲解见 iOS - UIView 动画 2.UIImageView 动画 具体讲解见 iOS - UIImageView 动画 3.CADisplayLink 定时器 具体 ...

  8. iOS 实现启动屏动画(Swift实现,包含图片适配)

    代码地址如下: http://www.demodashi.com/demo/12090.html 准备工作 首先我们需要确定作为宣传的图片的宽高比,这个一般是与 UI 确定的.一般启动屏展示会有上下两 ...

  9. 基于Swift的简易iOS天气APP

    文章目录 1. 项目简介 1.1 功能与参数 1.2 效果图 2. 运行方法 3. 相关资源 3.1 API参考文档 3.2 天气图标 4. 项目源码 1. 项目简介 这是一款用Swift 5编写的简 ...

  10. android做开场动画,Android_Android开场动画类完整实现代码,本文所述实例为在android中开起 - phpStudy...

    Android开场动画类完整实现代码 本文所述实例为在android中开起开场动画类,已封装好,进行android开发的朋友可使用.在这个类中,你可以:设置开场动画的图片资源.返回下一个要启动的Act ...

最新文章

  1. eclipse 开发常见问题集锦
  2. 在JavaScript中深度克隆对象的最有效方法是什么?
  3. Java IO: 网络
  4. 20210912模拟
  5. 欢乐纪中某B组赛【2019.1.27】
  6. ADFS 登录页面自定义
  7. 关于idea的git账号与电脑的git账号不一致的问题。已解决!
  8. mysql vector查找_vectort
  9. UVA11192 Group Reverse【水题】
  10. AS数据库自动备份的DOS语句
  11. 学生电子计算机协会,CCF电子科技大学学生分会换届大会成功举行
  12. 二、CGS2000坐标系
  13. sas编程技术教程 人大经济论坛sas培训
  14. Redis客户端工具安装
  15. oppo强制升级android版本,OPPO R17升级更新安卓9.0固件rom刷机包:正式版本-C.10
  16. 论文、报告中那些乱七八糟的图(甘特图、卡吉图,桑基图,小提琴图,弦图,螺旋图,风玫瑰图)
  17. 【208.11.21 直播QA】TI C2000 Piccolo单芯片——实现双轴伺服电机和马达控制
  18. oracle delete一直没有结束怎么办 教你跟踪delete和rollback进度之-《delete跟踪篇》
  19. 使用jib-maven-plugin分层构建Docker镜像——避免直接使用FatJar
  20. python中 jsonchema 与 shema 效率比较

热门文章

  1. 批量检测六间房直播状态
  2. 查找和替换文本和其他 Word 文档中的数据(转)
  3. 大数据技术之Flink理论到项目
  4. JAVA计算机毕业设计信贷管理系统Mybatis+源码+数据库+lw文档+系统+调试部署
  5. 瑞泰工程泰州BIM第十四期培训计划!
  6. 从日常开发说起,浅谈HTTP协议是做什么的。
  7. 天天爱跑步【树上差分】
  8. 免密登陆和ssh-copy-id命令解析
  9. 引用了撤稿文章, 该如何应对?
  10. 爱尚随身WiFi用秒切科技打造居家出行网络管家