To run the example project, clone the repo, and run pod install
from the Example directory first.
#import <MECheckbox/MECheckbox.h>
...
// by code
UIImage *checked = [UIImage imageNamed:@"checked"];
UIImage *unchecked = [UIImage imageNamed:@"unchecked"];
CGRect frame = CGRectMake(0, 0, checked.size.width, checked.size.height);
MECheckbox *checkbox = [[MECheckbox alloc] initWithFrame:frame];
checkbox.checkedImage = checked;
checkbox.uncheckedImage = unchecked;
[self.view addSubview:checkbox];
Or just use Interface Builder - drag UIView, set class MECheckbox to it, than use designable properties 'checked' & 'unchecked' — IB draws checkbox live on any view in storyboard or in xib.
You can use any UIImage what you want, but remember - checkbox doesn't resize yourself for new images. You must set frame for checkbox manually or by Auto Layout!
UIKit
MECheckbox is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MECheckbox"
SoundBlaster, egor-git@egormerkushev.ru
MECheckbox is available under the MIT license. See the LICENSE file for more info.