测试已测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可证 | MIT |
发布最后发布 | 2016 年 9 月 |
由 harushuu 维护。
依赖项 | |
SHButton | ~> 0.1.9 |
Masonry | ~> 0.6.4 |
使用 CocoaPods,将以下行添加到您的 Podfile 中。
pod 'SHGuideView', '~> 0.1.1'
然后运行 pod install
,然后您就完成了!
if ([SHGuideViewController needShowGuidePage]) {
SHGuideViewController *guideViewController = [[SHGuideViewController alloc] initWithImageName:@"Guide" guidePage:3 completeHandle:^{
//code... push your view controller;
}];
self.window.rootViewController = guideViewController;
} else {
//code... push your view controller;
}
一个简单的引导视图控制器。
只需要设置 imageName 和页面数,然后请使用您的代码实现 block 功能。
请根据以下格式重命名您的指南图像:
yourImageName == 'Guide' yourImageTotalCount == 3
您的指南图像与 iPhone4S 分辨率:请将图像重命名为 'Guide_iPhone4S_1' 请将图像重命名为 'Guide_iPhone4S_2' 请将图像重命名为 'Guide_iPhone4S_3'
您的指南图像与 iPhone5 分辨率:请将图像重命名为 'Guide_iPhone5_1' 请将图像重命名为 'Guide_iPhone5_2' 请将图像重命名为 'Guide_iPhone5_3'
您的指南图像与 iPhone6 分辨率:请将图像重命名为 'Guide_iPhone6_1' 请将图像重命名为 'Guide_iPhone6_2' 请将图像重命名为 'Guide_iPhone6_3'
您的指南图像与 iPhone6P 分辨率:请将图像重命名为 'Guide_iPhone6P_1' 请将图像重命名为 'Guide_iPhone6P_2' 请将图像重命名为 'Guide_iPhone6P_3'
###custom
// default color is lightGrayColor
@property (nonatomic, strong) UIColor *pageIndicatorTintColor;
// default color is darkGrayColor
@property (nonatomic, strong) UIColor *currentPageIndicatorTintColor;
// default color is lightGrayColor
@property (nonatomic, strong) UIColor *comfirmButtonTintColor;
// default color is whiteColor
@property (nonatomic, strong) UIColor *comfirmButtonTitleColor;
// default title is @"Start"
@property (nonatomic, strong) NSString *comfirmButtonTitle;
// default cornerRadius is 3.f;
@property (nonatomic, assign) CGFloat comfirmButtonCornerRadius;
// default is 70.f; distacen screen bottom from confirmButtonBottom;
@property (nonatomic, assign) CGFloat confirmButtonBottom;
// default is 30.f; distance screen bottom from pageIndicatorBottom;
@property (nonatomic, assign) CGFloat pageIndicatorBottom;
//
// if above property can not satisfies you, please complete custom comfirm button;
//
@property (nonatomic, strong) UIButton *userComfirmButton;
@harushuu, [email protected]
英文:SHGuideView 可在 MIT 许可下使用,有关更多信息请参阅 LICENSE 文件。