- version
- 0.0.5
- Cocoapods
- pod 'DWGuidePage', '~> 0.0.5'
此项目使用Xcode8.1创建,低版本Xcode打开可能会无法使用
如果感觉不错,请给个Star支持一下
使用中如果遇到什么问题可以联系我
QQ群:577506623
coderdwang@outlook.com
e-mail:USE/使用
-
将DWGuidePage文件夹拖入到项目中
-
在appdelegate.m中引入头文件
- #import "DWGuidePage.h"
- #import "引导页.h"
- #import "首页.h"
-
在- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {} 方法中加入以下代码
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; //只有在第一次打开时出现,后续更新不会出现GuidePage [DWGuidePage setEveryVersionChangeEnabled:YES]; [DWGuidePage configAppWindow:self.window fromGuidePgaeViewController:[GuidePageController new] toMainViewController:[ViewController new]]; [self.window makeKeyAndVisible];
-
在引导页控制器中引入头文件
#import "DWGuidePage.h"
-
可以选择使用代理或者Block
[[DWGuidePage alloc] initWithImgsArray:@[@"IMG_1", [UIImage imageNamed:@"IMG_2"], @"IMG_3", [UIImage imageNamed:@"IMG_4"]] guidePageCurrentIdx:^(NSInteger currentIdx) { //当前页码 } guidePageCurrentIdxAndCurrentX:^(NSInteger currentIdx, CGFloat currentX, BOOL isSlipPageEnd) { }]; - (void)guidePageWithCurrentIdx:(NSInteger)currentIdx andCurrentX:(CGFloat)currentX slipPageEnd:(BOOL)isSlipPageEnd { }