TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Feb 2015 |
Maintained by lslin.
Alternative to UIActionSheet with a block-based API and a customizable look.
LSActionView.h
and LSActionView.h
to your project. #import "LSActionView.h"
where your want to use.Requires iOS 4.3 and above.
#import "LSActionView.h"
- (void)onShareTapped:(id)sender {
//show without button title
NSArray *images = @[@"icon_dropbox", @"icon_rss", @"icon_facebook", @"icon_twitter"];
[[LSActionView sharedActionView] showWithImages:images actionBlock:^(NSInteger index) {
NSLog(@"Action trigger at %ld:", (long)index);
}];
//show with button title
NSArray *titles = @[@"Dropbox", @"Rss", @"Facebook", @"Twitter"];
[[LSActionView sharedActionView] showWithImages:images titles:titles actionBlock:^(NSInteger index) {
NSLog(@"Action trigger at %ld:", (long)index);
}];
}
@property (strong, nonatomic) UIColor *blankAreaColor;
@property (strong, nonatomic) UIColor *containerColor;
@property (strong, nonatomic) UIColor *buttonTitleColor;
@property (assign, nonatomic) CGFloat buttonFontSize;
@property (assign, nonatomic) CGFloat containerMargin;
@property (assign, nonatomic) CGFloat buttonIconWidth;
@property (assign, nonatomic) CGFloat buttonTitleHeight;