文章目录
  1. 1. 启动画面自定义动画

启动画面自定义动画

Ios技术文章收录

添加一个ViewController,在这个ViewController的view中添加一个ImageView,全屏显示,横竖屏你自己设定,这个imageView的初始图片可以跟你的启动页面一样,然后在应用程序启动后将这个ViewController 设置为rootViewController,在启动时就去获取网络图片的url,然后异步加载图片,将这个图片设置为ImageView的图片。显示出图片后再更换rootViewController,在切换rootViewController时为了自然过渡可以增加一些动画效果,如翻转、淡入淡出等。

思路如下:

  1. self.window.rootViewController = self.welcomeViewController(显示网络图片的Controller)

  2. EGOImageView *imageView = [[EGOImageView alloc] initWithPlaceholderImage:[UIImage imageNamed:@”xxxx”]];

   [ imageView setImageUrl:@”xxx”]; //这样就可以异步加载图片了,也可以用其他第三方库加载

  1. 动画切换rootViewController, 可以用UIView beginAnimation 或者UIView transitionWithView等来实现
文章目录
  1. 1. 启动画面自定义动画