Giter Site home page Giter Site logo

alactionsheet's Introduction

ALActionSheeta

一个简单实用的actionSheet.

其中包括两种style ,通过以下两种方法创建

+ (ALActionSheet *)createActionSheetView;

+ (ALActionSheet *)createAlertView;

通过以下方法添加button和间隔:

- (void)addButtonWithTitle:(NSString *)title andType:(ALActionSheetButtonStyle)buttonStyle andCallbackBlock:(CallbackBlock)callback;

- (void)insertInterval;

其中有四种button和三种简单的动画选择

typedef enum{ ALActionSheetButtonStyleDefault, ALActionSheetButtonStyleBlue, ALActionSheetButtonStyleRed, ALActionSheetButtonStyleGary, }ALActionSheetButtonStyle;

typedef enum{ ALActionSheetAnimationStyleBottom, ALActionSheetAnimationStyleTop, ALActionSheetAnimationStyleFade }ALActionSheetAnimationStyle;

最后呈现一个小Demo:

ALActionSheet * actionsheet = [ALActionSheet createActionSheetView];
[actionsheet addButtonWithTitle:@"ActionSheet" andType:ALActionSheetButtonStyleDefault andCallbackBlock:^{
    NSLog(@"1");
 }];
[actionsheet addButtonWithTitle:@"Hello" andType:ALActionSheetButtonStyleBlue andCallbackBlock:^{
    NSLog(@"2");
}];
[actionsheet addButtonWithTitle:@"It is easily!" andType:ALActionSheetButtonStyleGary andCallbackBlock:^{
    NSLog(@"3");
}];
[actionsheet insertInterval];
[actionsheet addButtonWithTitle:@"Cancel" andType:ALActionSheetButtonStyleRed andCallbackBlock:^{
    NSLog(@"1");
}];
[actionsheet setTitle:@"ActionSheet"];
[actionsheet setMessage:@"Animation style 1"];
[actionsheet showInView:self.view];

alactionsheet's People

Contributors

arthurli avatar

Stargazers

 avatar

Watchers

 avatar  avatar

alactionsheet's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.