Code Monkey home page Code Monkey logo

guideview's Introduction

GuideView

一个简单地引导界面

##UsePage ###必须实现 在你的第一个VC的ViewDidLoad里添加如下代码即可。不需要判断启动和版本。

	let ccp = CCPGuideView(frame:UIScreen.mainScreen().bounds)

添加你的引导页

    ccp.contentImages = {
        let arr : Array<UIImage> = [UIImage(named:"guide_page_1")!,UIImage(named:"guide_page_2")!,UIImage(named: "guide_page_3")!,UIImage(named: "guide_page_4")!]
        return arr
    }

展现引导页

    ccp.showGuideView()

###可选实现
每页引导页的标题

    ccp.titles = {
                return ["文章分类,方便阅读","纯黑设计,极客最爱","代码高亮,尊重技术","一键分享,保留精彩"]
            }

引导页的大小 如果不写默认全屏

    ccp.contentSize = {
        return CGSizeMake(250, 250)
    }

定制进入按钮,可默认

ccp.doneButton = {
        let button : UIButton = UIButton(frame:CGRectMake(ccp.frame.size.width * 0.1, ccp.frame.size.height * 0.9, ccp.frame.size.width * 0.8, 50))
        button.setImage(UIImage(named: "button_start", inBundle: NSBundle(forClass:CCPGuideView.self), compatibleWithTraitCollection: nil), forState:.Normal)
        return button
    }

guideview's People

Contributors

fengdeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mohsinalimat

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.