MSLaunchView
一键生成APP引导页,包括不同状态下的引导页操作方式,支持动态图片引导页和静态图片引导页,支持跳过按钮和立即体验按钮,完全自定义PageControl样式(支持方形点,圆形点,横线+小圆点样式等),省略冗余代码,集成性高,使用方便;
声明:部分图片来源于网络,如有涉及版权将立即删除,敬请谅解;
效果图展示:
APP静态图片引导页(上)| APP动态图片引导页(下)
手动进入体验 | 自动进入体验 |
---|---|
![]() |
![]() |
手动进入体验 | 自动进入体验 |
![]() |
![]() |
更新记录:
使用方式(支持代码创建和Storyboard创建项目)
图片数组(gif自动识别)
使用代码创建的项目,无进入立即按钮
MSLaunchView *launchView = [MSLaunchView launchWithImages:imageNameArray isScrollOut:YES];
使用Storyboard创建的项目,无进入立即按钮
MSLaunchView *launchView = [MSLaunchView launchWithImages:imageNameArray sbName:@"" isScrollOut:NO];
使用代码创建的项目,有进入立即按钮
MSLaunchView *launchView = [MSLaunchView launchWithImages:imageNameArray guideFrame:rt gImage:[UIImage imageNamed:@""] isScrollOut:NO];
使用Storyboard创建的项目,有进入立即按钮
MSLaunchView *launchView = [MSLaunchView launchWithImages:imageNameArray sbName:@"" guideFrame:rt gImage:[UIImage imageNamed:@""] isScrollOut:YES];
小视频(目前仅支持单个视频文件)
NSString *path = [[NSBundle mainBundle] pathForResource:@"测试" ofType:@"mp4"];
NSURL *url = [NSURL fileURLWithPath:path];
[MSLaunchView launchWithVideo:CGRectMake(0, 0, MSScreenW, MSScreenH) videoURL:url];
==!!!如果您使用带有立即进入按钮的初始化方法,那么后面的guideBtnCustom:方法将会失效!!!==
视频的用法与图片的用法基本一致,这里不再赘述,具体请参考Demo
集成方式
1. 下载项目或下载项目中的MSLaunchView文件夹,将下载文件拖拽到自己的项目文件夹中,并在AppDelegate.h中导入#import "MSLaunchView.h"头文件;
2. Cocoapods集成
在项目的Podfile文件中添加以下代码
pod 'MSLaunchView', '~>0.0.5'
您还可以进行简单设置
launchView.guideTitle = @"";
launchView.guideTitleColor = [UIColor redColor];
//是否隐藏跳过按钮
launchView.isHiddenSkipBtn = YES;
//PageControl属性
launchView.nomalColor = [UIColor lightGrayColor];
launchView.currentColor = [UIColor orangeColor];
//视频拉伸方式
launchView.videoGravity = AVLayerVideoGravityResize;
//播放完成是否自动推出 默认:YES
launchView.isPalyEndOut = NO;
自定义按钮
自定义立即进入按钮
[launchView guideBtnCustom:^UIButton * _Nonnull{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(60, 60, 120, 120);
[btn setBackgroundColor:[UIColor redColor]];
[btn addTarget:self action:@selector(hidde) forControlEvents:UIControlEventTouchUpInside];
return btn;
}];
-(void)hidde{
[_launchView hideGuidView];
自定义跳过按钮
[launchView skipBtnCustom:^UIButton * _Nonnull{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(60, 200, 120, 120);
[btn setBackgroundColor:[UIColor blueColor]];
[btn addTarget:self action:@selector(hidde) forControlEvents:UIControlEventTouchUpInside];
return btn;
}];
-(void)hidde{
[_launchView hideGuidView];
}