• Stars
    star
    334
  • Rank 122,382 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ActionSheet and UIActivityViewController replacement, using a descriptor component.

My other works

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

JMActionSheetDescription

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.

More Repositories

1

CalendarIOS7

Calendar component for iOS apps
Objective-C
560
star
2

JMHoledView

A view design to be filled with holes ...
Objective-C
546
star
3

PermissiveResearch

An iOS search engine that allows mistakes in the searched element.
Objective-C
410
star
4

JMAnimatedImageView

Subclass of UIImageView to drive easy animations (manual rotation, Carousel, GIF support)
Objective-C
406
star
5

iAppInfos

iAppInfos allows a easy access to ALL important App informations : iOS version, Device model, Free Disk Space, Mobile provisionning infos
Objective-C
190
star
6

CustomScrollIndicator

iOS custom ScrollIView indicator
Objective-C
183
star
7

UINavigationControllerWithCompletionBlock

The UINavigationControllerWithCompletionBlock missing API !
Objective-C
139
star
8

JMOTableViewDescription

JMOTableViewDescription is an Objective-C library for easily creating and manage complex structured tableView.
Objective-C
73
star
9

LanguagesManager

An easy way to control manually the language in your application
Objective-C
64
star
10

JMCache

JMCache is a key/value store designed for persisting temporary objects. Particularities?? (NSCoding is not mandatory, you can add custom transformer to secure your data)
Objective-C
61
star
11

SecureMappingKit

Securize the mapping between your JSON and your model.
Objective-C
39
star
12

JMFormDescription

JMFormDescription is an Objective-C library for easily creating and manage complex structured Form.
Objective-C
31
star
13

JMImageScanning

Basic ocr recognition to hack secure keyboards
Objective-C
26
star
14

conference-download-scripts

Amazing videos are available but i want to see it offline
Shell
13
star
15

JMSystemNotifications

JMSystemNotifications is an Objective-C library for easily register/unregister OS System notifications
Objective-C
9
star
16

JMCrashIfResign

JMCrashIfResign is a way to protect your application against bad usage
Objective-C
8
star
17

postman

Postman iOS app to edit/execute Postman collections
Objective-C
7
star
18

ApplicationLoader-Errors

A lot of errors can occurs during Application submission !
7
star
19

JMDynamicDeviceName

JMDynamicDeviceName
Shell
4
star
20

MediaPickerManager

Shared object that allow to simplify UIImagePickerController
Objective-C
4
star
21

shakeMyApps-appScan-blog

HTML
3
star
22

DesignPatterns

Cocoa common design patterns
Objective-C
2
star
23

MaryToastin

Toast component using MaryPopin module
Objective-C
2
star
24

HexaColor

A library to parse Hexa string colors
Shell
1
star
25

JMAnimationDescription

Describe your animation, i'm doing it
Objective-C
1
star
26

bitly_ios_sdk

Objective-C
1
star
27

OneSignal-NodeJS-SDK

1
star
28

twitterCleaner

A simple OSX command line to purge yours "friends" (after an account hack for example ... in my case)
Objective-C
1
star
29

try_git

1
star
30

xctool-log2junit

A tool to convert your Xcodebuild tests output to a JUnit formated results
Shell
1
star