RCSLabeledIconButton 1.0

RCSLabeledIconButton 1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.



RCSLabeledIconButton makes it easy to customize the position of the image and text label of a UIButton. It comes with several built-in layout modes and is easy to subclass to add more.

Installation

Just copy the files in RCSLabeledIconButton/ into your Xcode project, or use the Cocoapod.

Podfile

platform :ios, '7.0'
pod "RCSLabeledIconButton", "~> 1.0"

Usage

Instances of RCSLabeledIconButton can be configured with two properties:

  • labeledIconButtonLayoutMode: Layout mode.

    • RCSLabeledIconButtonLayoutModeDefault The icon is on the left of the Label, same as UIButton, but this class allows you to customize the distance between the two more easily.

    • RCSLabeledIconButtonLayoutModeReversed Opposite of default.

    • RCSLabeledIconButtonLayoutModeIconTop The icon is above the label. Both are centered horizontally individually and vertically together.

    • RCSLabeledIconButtonLayoutModeIconBottom The icon is below the label. Both are centered horizontally individually and vertically together.

  • labeledIconButtonBufferMagnitude: Distance in points between the image and label.

For more information on how to use RCSLabeledIconButton, please see Example.xcodeproj.

Examples

RCSLabeledIconButton