Git Product home page Git Product logo

wsguidepageview's Introduction

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

效果图:

效果图

wsguidepageview's People

Contributors

yuhanle avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.