GithubHelp home page GithubHelp logo

doflatbutton_old's Introduction

DOFlatButton

Flat-Style Button converted from QBFlatButton

QBFlatButton is written in Objective-C but I write DOFlatButton by Swift

実行画像

##Propertys ###face Color A surface color of the button

button.faceColor = = UIColor(red: 86.0/255.0, green: 161.0/255.0, blue: 217.0/255.0, alpha: 1.0)

###sideColor A side color of the button

button.sideColor = UIColor(red: 79.0/255.0, green: 127.0/255.0, blue: 179.0/255.0, alpha: 1.0)

##borderColor A border color of the button

button.sideColor = UIColor(red: 79.0/255.0, green: 127.0/255.0, blue: 179.0/255.0, alpha: 1.0)

##cornerRadius A corner raius of the button

button.radius = 8.0

##height A button height in normal state

button.margin = 4.0

##depth A button depth when the button pushed down

button1.depth = 3.0

##borderWidth A border width of the button

button.borderWidth = 2.0

##Example

var button1:DOFlatButton = DOFlatButton.buttonWithType(UIButtonType.Custom) as DOFlatButton

button1.frame = CGRectMake(60, 164 - 20 - 40, 200, 60)  
button1.faceColor = UIColor(red: 86.0/255.0, green: 161.0/255.0, blue: 217.0/255.0, alpha: 1.0)  
button1.sideColor = UIColor(red: 79.0/255.0, green: 127.0/255.0, blue: 179.0/255.0, alpha: 1.0)  
button1.radius = 8.0  
button1.margin = 4.0  
button1.depth  = 3.0  
button1.titleLabel?.font = UIFont.boldSystemFontOfSize(16)  
button1.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal)  
button1.setTitle("DOFlatButton", forState: UIControlState.Normal)  
self.view.addSubview(button1)  

License

DOFlatButton is released under the MIT License

doflatbutton_old's People

Contributors

daisukeokaoss avatar fulldecent avatar

Watchers

 avatar  avatar

doflatbutton_old's Issues

Cocoapods

Please add cocoapods and carthage

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.