源码简介:简单实用的app引导页,能后在图片之间渐变切换,***进入主VC.
源码效果:
源码片段:
- 导入ZWIntroductionViewController.h/m文件:
- #import "ZWIntroductionViewController.h"
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- // ...
- // 定制引导页的图片内容
- NSArray *coverImageNames = @[@"img_index_01txt", @"img_index_02txt", @"img_index_03txt"];
- NSArray *backgroundImageNames = @[@"img_index_01bg", @"img_index_02bg", @"img_index_03bg"];
- self.introductionView = [[ZWIntroductionViewController alloc] initWithCoverImageNames:coverImageNames backgroundImageNames:backgroundImageNames];
- [self.window addSubview:self.introductionView.view];
- __weak AppDelegate *weakSelf = self;
- self.introductionView.didSelectedEnter = ^() {
- [weakSelf.introductionView.view removeFromSuperview];
- weakSelf.introductionView = nil;
- // enter main view , write your code ...
- //可以在这个block里面进入自己的主VC
- };
- }