https://github.com/tinymind/lsactionview
Alternative to UIActionSheet with a block-based API and a customizable look.
https://github.com/tinymind/lsactionview
Last synced: 9 months ago
JSON representation
Alternative to UIActionSheet with a block-based API and a customizable look.
- Host: GitHub
- URL: https://github.com/tinymind/lsactionview
- Owner: tinymind
- License: mit
- Created: 2015-02-05T09:55:12.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-06T06:03:30.000Z (almost 11 years ago)
- Last Synced: 2025-04-16T22:25:48.124Z (9 months ago)
- Language: Objective-C
- Size: 273 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LSActionView
Alternative to UIActionSheet with a block-based API and a customizable look.
## Installation
- Add `LSActionView.h` and `LSActionView.h` to your project.
- Or use CocoaPods: `pod 'LSActionView'`.
## Requirements
Requires iOS 4.3 and above.
## Usage
``` cpp
#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);
}];
}
```
## Customizable
``` cpp
@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;
```
## Examples
### Without title

### With title

### Landscape
