https://github.com/yuhanle/wsguidepageview
GuidePageView with mutative bgcolor
https://github.com/yuhanle/wsguidepageview
guidepageview
Last synced: about 1 year ago
JSON representation
GuidePageView with mutative bgcolor
- Host: GitHub
- URL: https://github.com/yuhanle/wsguidepageview
- Owner: yuhanle
- Created: 2015-11-04T08:58:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-22T02:44:50.000Z (about 9 years ago)
- Last Synced: 2025-02-09T05:25:42.983Z (over 1 year ago)
- Topics: guidepageview
- Language: Objective-C
- Homepage: https://latehorse.github.io/
- Size: 2.59 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WSGuidePageView
这是一个实用在app启动时添加引导页的分享
### 功能:
1.滑动时背景色渐变效果
2.自定义索引形式
### 配置:
- 初始化背景图和覆盖图
```
// Added Introduction View Controller
NSArray *coverImageNames = @[@"p1", @"p2", @"p3", @"p4"];
NSArray *backgroundImageNames = @[@"p1_bg", @"p2_bg", @"p3_bg", @"p4_bg"];
```
- 设置进入应用的button
```
// Example 2
UIButton *enterButton = [UIButton new];
enterButton.titleLabel.font = [UIFont systemFontOfSize:16];
[enterButton setTitleColor:[UIColor colorWithRed:75 / 255.0 green:70 / 255.0 blue:71 / 255.0 alpha:1.0] forState:UIControlStateNormal];
[enterButton setTitle:@"立即体验" forState:UIControlStateNormal];
[enterButton setBackgroundImage:[UIImage imageNamed:@"button"] forState:UIControlStateNormal];
[enterButton setBackgroundImage:[UIImage imageNamed:@"button_down"] forState:UIControlStateHighlighted];
self.introductionView = [[WSIntroductionViewController alloc] initWithCoverImageNames:coverImageNames backgroundImageNames:backgroundImageNames button:enterButton];
```
- 设置索引的形式 通过图片自定义
```
// 设置索引图片
[self.introductionView setImage:[UIImage imageNamed:@"index"]
highlightedImage:[UIImage imageNamed:@"index_sel"]
dotRadius:6.0f];
self.window.rootViewController = self.introductionView;
__weak AppDelegate *weakSelf = self;
self.introductionView.didSelectedEnter = ^() {
[weakSelf.introductionView.view removeFromSuperview];
weakSelf.introductionView = nil;
ViewController *mainVC = [[ViewController alloc] init];
weakSelf.window.rootViewController = mainVC;
};
```
### 效果图:
