zl程序教程

您现在的位置是:首页 >  APP

当前栏目

app引导页

2023-04-18 14:56:51 时间

源码简介:简单实用的app引导页,能后在图片之间渐变切换,***进入主VC.

源码效果:

源码片段:

  1. 导入ZWIntroductionViewController.h/m文件:  
  2.   
  3. #import "ZWIntroductionViewController.h"  
  4.   
  5. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  
  6.     // ...   
  7. // 定制引导页的图片内容  
  8. NSArray *coverImageNames = @[@"img_index_01txt", @"img_index_02txt", @"img_index_03txt"];  
  9. NSArray *backgroundImageNames = @[@"img_index_01bg", @"img_index_02bg", @"img_index_03bg"];  
  10. self.introductionView = [[ZWIntroductionViewController alloc] initWithCoverImageNames:coverImageNames backgroundImageNames:backgroundImageNames];  
  11.   
  12. [self.window addSubview:self.introductionView.view];  
  13.   
  14. __weak AppDelegate *weakSelf = self;  
  15. self.introductionView.didSelectedEnter = ^() {  
  16.     [weakSelf.introductionView.view removeFromSuperview];  
  17.     weakSelf.introductionView = nil;  
  18.   
  19.     // enter main view , write your code ...  
  20.    //可以在这个block里面进入自己的主VC  
  21.   
  22. };  

下载地址:http://down.51cto.com/data/2096557