Latest 0.0.1
Homepage https://github.com/NicholasTD07/NTDAppStoreRoundFramedButton
License MIT
Platforms ios , requires ARC
Frameworks UIKit
Authors

NTDAppStoreRoundFramedButton is like the round framed button in iOS 7’s App Store, more specifically, the button which says ‘$0.99’ or ‘DONE’.

How To Use it

  1. Add NTDAppStoreRoundFramedButton into your project using CocoaPods or just draging the files into your project.
  2. Drag out a UIButton from Storyboard.
  3. Change it class to NTDAppStoreRoundFramedButton.
  4. To make Autolayout work properly, set the Inset in Attribute Inspector to this:

    Top and bottom: 5,
    left and right: 11.

  5. Then just use it as a UIButton.
  6. For further customisation, have a look at NTDAppStoreRoundFramedButton.h, only 4 methods inside it.

How Does It Work

Basically it is setting following attributes to the specified value:

Attributes Value
titleFontSize 13
cornerRadius 4
borderWidth 1
borderColor button.tintColor.CGColor
topAndBottomInset 5
leftAndRightInset 11

And that’s why you need to setup the inset in Attribute Inspector for Autolayout to work properly.

Latest podspec

{
    "name": "NTDAppStoreRoundFramedButton",
    "version": "0.0.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "An iOS 7 App Store round framed style button.",
    "homepage": "https://github.com/NicholasTD07/NTDAppStoreRoundFramedButton",
    "authors": {
        "NicholasTD07": "[email protected]"
    },
    "source": {
        "git": "https://github.com/NicholasTD07/NTDAppStoreRoundFramedButton.git",
        "tag": "0.0.1"
    },
    "description": "                NTDAppStoreRoundFramedButton is like the round framed button found in iOS 7's App Store, more specifically, the button which says '$0.99' or 'OPEN'.n                Though the code is simple, it took some time to adjust the apperance of the button to look like the button in App Store.n",
    "source_files": "NTDAppStoreRoundFramedButton/*.{h,m}",
    "frameworks": "UIKit",
    "requires_arc": true,
    "platforms": {
        "ios": null
    }
}

Pin It on Pinterest

Share This