MSLaunchView
一鍵合成APP引導頁,包含不同狀態(tài)下的引導頁操作方式,同時支持動態(tài)圖片引導頁和靜態(tài)圖片引導頁,支持按鈕跳過按鈕,立即體驗按鈕完全自定義,省掉冗余的代碼,集成性高,使用方便;
聲明:部分圖片來源于網絡,如有涉及版權會馬上刪除,敬請諒解;
效果圖展示:
APP靜態(tài)圖片引導頁(上) | APP動態(tài)圖片引導頁(下)
手動進入和自動進入體驗




使用方式(支持代碼創(chuàng)建和StoryBoard創(chuàng)建項目):
圖片數組(gif自動識別):
?使用代碼創(chuàng)建的項目,無進入立即按鈕:
MSLaunchView *launchView = [MSLaunchView launchWithImages:@[@"launch1",@"launch2",@"launch3"]];
使用StoryBoard創(chuàng)建的項目,無進入立即按鈕:
[MSLaunchView launchWithImages:@[@"launch1",@"launch2",@"launch3"] sbName:@"Main"];
使用代碼創(chuàng)建的項目,有進入立即按鈕:
[MSLaunchView launchWithImages:imageNameArray guideFrame:CGRectMake(MSScreenW*0.3, MSScreenH*0.8, MSScreenW*0.4, MSScreenH*0.08) gImage:[UIImage imageNamed:@""]];
使用StoryBoard創(chuàng)建的項目,有進入立即按鈕:
[MSLaunchView launchWithImages:imageNameArray sbName:@"Main" guideFrame:CGRectMake(MSScreenW*0.3, MSScreenH*0.8, MSScreenW*0.4, MSScreenH*0.08) gImage:[UIImage imageNamed:@""]];
小視頻(目前僅支持單個視頻文件):
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];
}