Latest 1.2.1
Homepage https://github.com/louis-ly/LYActionSheet
License MIT
Platforms ios 6.0, requires ARC
Frameworks UIKit
Authors

LYAcitionSheet (高仿微信ActionSheet)

一个高仿微信ActionSheet的弹框.

image

AutoLayout屏幕旋转适配

image

Podfile

CocoaPods is the recommended method to install MessageDisplayKit, just add the following line to Podfile

支持CocoaPods. 只要在Podfile文件中加入一行

pod 'LYActionSheet'

and run pod install, then you’re all done!

接着在终端输入pod install即可

How to use

Easy to drop into your project.

该库很容易接入项目

1、import LYActionSheet header file.

1.导入头文件LYActionSheet.h

#import "LYActionSheet.h" 

2、Initialize LYActionSheet class. There have four methods to initialize.

2.本库提供了有四个初始化的方法

- (instancetype)initWithButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
- (instancetype)initWithCancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
- (instancetype)initWithCancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
- (instancetype)initWithTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;

3、Show the actionSheet, block will be called when the user presses on button.

3.调用显示弹框. 用户点击选项按钮是block会调用.

- (void)showWithClickedButtonAtIndex:(void(^)(NSInteger buttonIndex, NSString *buttonTitle))clickedBlock;
- (void)showWithClickedButtonAtIndex:(void(^)(NSInteger buttonIndex, NSString *buttonTitle))clickedBlock cancel:(void(^)(NSString *buttonTitle))cancelBlock;

Latest podspec

{
    "name": "LYActionSheet",
    "version": "1.2.1",
    "summary": "An actionSheet like WeChat",
    "homepage": "https://github.com/louis-ly/LYActionSheet",
    "license": "MIT",
    "frameworks": "UIKit",
    "platforms": {
        "ios": "6.0"
    },
    "authors": {
        "louis": "[email protected]"
    },
    "source": {
        "git": "https://github.com/louis-ly/LYActionSheet.git",
        "tag": "1.2.1"
    },
    "source_files": "LYActionSheet/Classes/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This