Latest 0.5.2
Homepage https://github.com/leverdeterre/JMActionSheetDescription
License MIT
Platforms ios 6.0, requires ARC
Authors

My other works

[http://leverdeterre.github.io] (http://leverdeterre.github.io)

ActionSheet and UIActivityViewController replacement, using a descriptor component.

Twitter
License MIT
CocoaPods
Platform

Capability

  • present labels
  • present actions (UIButton)
  • present image(s)
  • present picker
  • present datepicker
  • present icons collections

Changelog

0.5.0 :

  • improve DatePicker (updateBlock, validateBlock)
  • improve Swift compatibility

0.4.9 :

  • add DatePicker support

0.4.7 / 0.4.8 :

  • Improve protocol usage
  • Increase Swift compatibility
  • Fix autolayout (in demo)

0.4.6 :

  • FIX autorotate,
  • FIX iOS7 crash,
  • Starting autolayout implementation and rotation support

0.4.5 :

  • Add support for iOS9,
  • Add support of UITraitCollection,
  • Add support of UIPopoverPresentationController.

0.4.2 :

  • Add multiple pictures selecion support.

0.4.0 :

  • Add UICollectionView support.

Screenshots

Image
Image
Image
Image
Image
Image
Image
Image

Installation & Usage

JMActionSheetDescription is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "JMActionSheetDescription"

Manual creation

//init your description
JMActionSheetDescription *desc = [[JMActionSheetDescription alloc] init];

//Configure your colors
desc.actionSheetTintColor = [UIColor grayColor];
desc.actionSheetCancelButtonFont = [UIFont boldSystemFontOfSize:17.0f];
desc.actionSheetOtherButtonFont = [UIFont systemFontOfSize:16.0f];

//Cancel item
JMActionSheetItem *cancelItem = [[JMActionSheetItem alloc] init];
cancelItem.title = @"Cancel";
desc.cancelItem = cancelItem;

//Can configure a context for your action .. an url ? image ? (work in progress)
JMActionContextItem *contextItem = [[JMActionContextItem alloc] init];
contextItem.image = [UIImage imageNamed:@"gif_experiments"];
contextItem.imageHeight = 200.0f;
desc.contextItem = contextItem;
desc.title = @"Available actions for component";

//item + block
JMActionSheetItem *itemShare = [[JMActionSheetItem alloc] init];
itemShare.title = @"last action";
itemShare.action = ^(void){
    NSLog(@"last action pressed");
};

//Pickeritem + block
JMActionSheetPickerItem *pickerItem = [[JMActionSheetPickerItem alloc] init];
    pickerItem.elements = @[@"One", @"Two", @"three", @"Four"];
    pickerItem.pickerAction = ^(NSString *selectedValue){
        NSLog(@"selectedValue %@",selectedValue);
    };

desc.items = @[itemShare,pickerItem];
[JMActionSheet showActionSheetDescription:desc inViewController:self];

Shortcuts for creation

To present a picker (JMDatePickerActionSheet)

NSDate *minDate = [NSDate date];
NSDate *minDate = [[NSDate date] dateByAddingTimeInterval:-60*60*24*1];
NSDate *maxDate = [[NSDate date] dateByAddingTimeInterval:60*60*24*60];

[JMDatePickerActionSheet showDatePickerActionSheetMinDate:minDate maxDate:maxDate selectedDate:selectedDate didSelectBlock:^(id selectedItem) {
      NSLog(@"Plop");
} 
title:@"MyTitle" 
inViewController:self];

To present a picker (JMPickerActionSheet)

[JMPickerActionSheet showPickerActionSheetElements:@[@"One", @"Two", @"three", @"Four"]
                                    didSelectBlock:^(NSString *selectedValue){
                                                    NSLog(@"selectedValue %@",selectedValue);}
                                            title:@"JMPickerActionSheet methods"
                                inViewController:self];

Present a mutliple images choice (JMImagesActionSheet)

[JMImagesActionSheet showImagesActionSheetImages:@[
                        [UIImage imageNamed:@"gif_experiments"],
                        [UIImage imageNamed:@"gif_experiments"],
                        [UIImage imageNamed:@"gif_experiments"]],
                                updateBlock:^(id selectedValue) {
                                                NSLog(@"did updateBlock %@",selectedValue); }
                                validateBlock:^(id selectedValue) {
                                                NSLog(@"did validateBlock %@",selectedValue); }
                                        title:@"The title"
                            inViewController:self];

License

JMActionSheetDescription is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "JMActionSheetDescription",
    "version": "0.5.2",
    "summary": "JMActionSheetDescription replace UIActionSheet and UIActivityViewController.",
    "description": "JMActionSheetDescription is a descriptor component. It replace your ActionSheet and UIActivityViewController usage. Write your actionSheet description and let the framework generate your custom action representation. (Support iOS9 SplitView !)nnCustomizable elements : button font, color, background.nCool added elements are : an PickerView,n                          an Horizontal carousel of iconified actions,n                          an Horizontal carousel of images,n                          an image to help understanding the context of action,n                          an URL (in progress),n                          an text (in progress).",
    "homepage": "https://github.com/leverdeterre/JMActionSheetDescription",
    "screenshots": [
        "https://github.com/leverdeterre/JMActionSheetDescription/blob/master/screenshots/ipads.png?raw=true",
        "https://github.com/leverdeterre/JMActionSheetDescription/blob/master/screenshots/iphones.png?raw=true",
        "https://github.com/leverdeterre/JMActionSheetDescription/blob/master/screenshots/ipad-splitview-2.png?raw=true"
    ],
    "license": "MIT",
    "authors": {
        "Ju00e9ru00f4me Morissard": "[email protected]"
    },
    "source": {
        "git": "https://github.com/leverdeterre/JMActionSheetDescription.git",
        "tag": "0.5.2"
    },
    "social_media_url": "https://twitter.com/leverdeterre",
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "JMActionSheetDescription": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This