Giter VIP home page Giter VIP logo

rsorthographicbutton's Introduction

RSOrthographicButton

A FlatUI-style UIButton subclass, UIAppearance compliant.

Good for iOS5 and above... currently tested in iOS6.1.2 and working fine...

Free to use/amend for personal or commercial use. All I ask is that I get a credit somewhere in the app or app store description, that you let me know and don't mind me mentioning you using it in blogs, social postings etc...

Using RSOrthographicButton

You can either add it straight to you .xib file by dragging in a UIButton an dthen changing the class to RSOrthographicButton or you can instantiate in code with initWithFrame:

Since it's a UIButton subclass it's got all the rest of the standard behaviour.

Configuring RSOrthographicButton

Check the header for the full lowdown on configurable properties and which are UIAppearance compliant. However if you like to be told what to do, and I know I do....

NSInteger shadowDrawnOffset - the offset value for the shadow, applied to both x and y position (hence orthographic)

CGFloat shadowAlpha - opacity of the shadow

NSInteger cornerButtonRadius - applied to both the button and the shadow

*UIColor buttonColor - The unselected/highlighted button colour

*UIColor selectColor - The highlighted/selected button colour

*UIColor shadowColor - The colour of the shadow

UIAppearance compliance

In short, yes. Thanks to some good advice on NSHipster here. You can call the accessors of any of the above properties from the UIAppearance proxy and it'll behave. Read the docs on UIAppearance as it's something we should all be doing...

rsorthographicbutton's People

Contributors

mightyleader avatar robkaldor avatar

Watchers

 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.