TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | May 2015 |
Maintained by Alan Bouzek.
A minimalistic counter control with increment and decrement functionality. It includes the ability to set a starting, maximum and minimum values as well as text attributes.
To run the example project, clone the repo, and run pod install
from the Example directory first.
An instance of ABCounterViewController should be created using the designated initializer:
-(instancetype) initWithDelegate:(id<ABCounterViewController)delegate
startCount:(float)startCount
minCount:(float)minCount
maxCount:(float)maxCount
stepInterval:(float)stepInterval
numberTextAttributes:(NSDictionary *)numberTextAttributes
buttonTextAttributes:(NSDictionary *)buttonTextAttributes
The delegate method:
-(void) counterViewController:(ABCounterViewController *)counterViewController
didUpdateToCount:(float)count
will be called each time the count is updated.
The frame must be set manually after initialization and looks best when the width is at least double the height.
abouzek, [email protected]
ABCounterViewController is available under the MIT license. See the LICENSE file for more info.