Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

(Obsolete) The codebase was transferred (partially) to the IOSEko repository. [eko, eko-ios] - Eko's Custom Action Sheet Controller for iOS

Notifications You must be signed in to change notification settings

EkoCommunications/EkoActionSheetController

Repository files navigation

EkoActionSheetController

Carthage compatible

Eko's Custom Action Sheet Controller for iOS

Installation

EkoActionSheetController requires iOS 8.0 or later.

iOS 8

  1. Drag the code itself (Source folder) to your project.
  2. Make sure that the files are added to the Target membership.

Using Carthage

  1. Add the EkoCommunications/EkoActionSheetController project to your Cartfile.

    github "EkoCommunications/EkoActionSheetController"
    
  2. Run carthage update, then follow the additional steps required to add the iOS and/or Mac frameworks into your project.

Basic Usage

Import framework.

@import EkoActionSheetController;

Just create EkoActionSheetItem instances and pass them to EkoActionSheetController

- (IBAction)onButtonTouch:(UIButton *)sender
{
        EkoActionSheetItem *item1 = [EkoActionSheetItem itemWithTitle:@"iOS"
                                                             handler:^(EkoActionSheetItem * _Nonnull item, UIViewController * _Nonnull actionSheetViewController)
                                                            {
                                                                itemActionHandler(item.title, item.image, actionSheetViewController);
                                                            }];

        EkoActionSheetItem *item2 = [EkoActionSheetItem itemWithTitle:@"Android"
                                                              handler:^(EkoActionSheetItem * _Nonnull item, UIViewController * _Nonnull actionSheetViewController)
                                                            {
                                                                itemActionHandler(item.title, item.image, actionSheetViewController);
                                                            }];                                                          

        [EkoActionSheetViewController presentOnViewController:self
                                                        items:@[item1, item2]
                                        headerBackgroundColor:[UIColor purpleColor]
                                           separatorLineColor:[UIColor purpleColor]
                                                        title:@"Select OS"
                                                   cancelItem:nil
                                                    applyItem:nil];

}

Demo

Build and run the EkoActionSheet Example project in Xcode to see EkoActionSheetController in action.

About

(Obsolete) The codebase was transferred (partially) to the IOSEko repository. [eko, eko-ios] - Eko's Custom Action Sheet Controller for iOS

Resources

Stars

Watchers

Forks