Skip to content

LVGradientActionSheet it's a custom Action Sheet with a colourful gradient that mimics UIActionSheet API.

License

Notifications You must be signed in to change notification settings

bilby91/LVGradientActionSheet

Repository files navigation

LVGradientActionSheet

Twitter License MIT Version Platform Build Status

LVGradientActionSheet it's a custom Action Sheet with a colourful gradient that mimics UIActionSheet API.

Blue Red

Usage

LVGradientActionSheet is really easy to use, the only big difference is the initialiser you need to call.

- (id)initWithOptions:(NSArray *)options
          cancelTitle:(NSString *)cancelTitle
     topGradientColor:(UIColor *)topColor
  bottomGradientColor:(UIColor *)bottomColor
             delegate:(id<LVGradientActionSheetDelegate>)delegate;

All the available delegate methods are this ones, take a look:

@protocol LVGradientActionSheetDelegate <NSObject>

@required

- (void)actionSheet:(LVGradientActionSheet *)actionSheet clickedButtonWithOption:(NSString *)option;

@optional

- (void)willPresentActionSheet:(LVGradientActionSheet *)actionSheet;  // before animation and showing view
- (void)didPresentActionSheet:(LVGradientActionSheet *)actionSheet;  // after animation

- (void)actionSheet:(LVGradientActionSheet *)actionSheet willDismissWithOption:(NSString *)option; // before animation and hiding view
- (void)actionSheet:(LVGradientActionSheet *)actionSheet didDismissWithWithOption:(NSString *)option;  // after animation

@end

Example

To run the example project; clone the repo, and run pod install from the Example directory first.

Installation

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

pod "LVGradientActionSheet"

Author

Martin F, me@bilby91.com

License

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

About

LVGradientActionSheet it's a custom Action Sheet with a colourful gradient that mimics UIActionSheet API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published