Latest 1.0.0
Homepage https://github.com/tinymind/LSActionView
License MIT
Platforms ios 4.3, requires ARC
Frameworks Foundation, UIKit
Authors

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


  #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


  @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

LSActionView Example1

With title

LSActionView Example2

Landscape

LSActionView Example3

Latest podspec

{
    "name": "LSActionView",
    "version": "1.0.0",
    "license": "MIT",
    "summary": "LSActionView is an alternative to UIActionSheet with a block-based API and a customizable look.",
    "homepage": "https://github.com/tinymind/LSActionView",
    "authors": {
        "lslin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/tinymind/LSActionView.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "4.3"
    },
    "requires_arc": true,
    "source_files": "Classes/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This