Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

快速合成APP引导页,并且同时支持动态图片引导页和静态图片引导页,支持跳过按钮,立即体验按钮完全自定义,支持PageControl最后一页是否显示,PageControl样式多样(支持方形点,圆形点,横线+小圆点样式等),省掉冗余的代码,集成性高,使用方便,欢迎大家使用!

License

Notifications You must be signed in to change notification settings

milletpeak/MSLaunchView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

48 Commits

Repository files navigation

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];
}

<<分享是一种美德,你的Star是我更新的动力,使用过程如果有什么问题可以issues,我会及时回复大家!>>

About

快速合成APP引导页,并且同时支持动态图片引导页和静态图片引导页,支持跳过按钮,立即体验按钮完全自定义,支持PageControl最后一页是否显示,PageControl样式多样(支持方形点,圆形点,横线+小圆点样式等),省掉冗余的代码,集成性高,使用方便,欢迎大家使用!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /