LCActionSheet Versions Save

一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。

3.2.4

6 years ago
  • 添加属性来控制 title 的 numberOfLines,#45 by iOSleep

    @interface LCActionSheetConfig : NSObject
    
    // Title can be limit in titleLinesNumber. Default is 0.
    @property (nonatomic, assign) NSInteger titleLinesNumber;
    
    @end
    
    @interface LCActionSheet : UIView
    
    // Title can be limit in titleLinesNumber. Default is 0.
    @property (nonatomic, assign) NSInteger titleLinesNumber;
    
    @end
    
  • 增加 Carthage 支持,#43 by devjia

3.2.3

6 years ago
  • 修复使用 prefersStatusBarHidden 方式设置状态栏隐藏在 LCActionSheet 中未生效的问题。#42 by devjia

3.2.2

7 years ago
  • 修复使用 preferredStatusBarStyle 方式设置状态栏样式在 LCActionSheet 中未生效的问题。#38 by LuYu001

3.2.1

7 years ago

3.2.0

7 years ago
  • 思来想去,还是恢复了“黑”状态栏的样式。现在 LCActionSheet 实例将会在调用 show 方法时,新建一个 UIWindow 实例并 makeKeyAndVisible,然后把 LCActionSheet 实例添加到该 UIWindow 实例之上。之前的逻辑是直接把 LCActionSheet 实例添加到 AppDelegate 的 keyWindow 上面。显然的,现在状态栏将被会灰色背景一块“黑”掉。

  • 新增下列方法,didDismiss 回调能很方便地满足在 LCActionSheet hide 时,需要在原 keyWindow 上操作的需求:

    @interface LCActionSheet : UIView
    
    // Initialize an instance of LCActionSheet (Block).
    + (instancetype)sheetWithTitle:(nullable NSString *)title
                 cancelButtonTitle:(nullable NSString *)cancelButtonTitle
                        didDismiss:(nullable LCActionSheetDidDismissHandler)didDismissHandler
                 otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
    
    // Initialize an instance of LCActionSheet with title array (Block).
    + (instancetype)sheetWithTitle:(nullable NSString *)title
                 cancelButtonTitle:(nullable NSString *)cancelButtonTitle
                        didDismiss:(nullable LCActionSheetDidDismissHandler)didDismissHandler
             otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray;
    
    // Initialize an instance of LCActionSheet (Block).
    - (instancetype)initWithTitle:(nullable NSString *)title
                cancelButtonTitle:(nullable NSString *)cancelButtonTitle
                       didDismiss:(nullable LCActionSheetDidDismissHandler)didDismissHandler
                otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
    
    // Initialize an instance of LCActionSheet with title array (Block).
    - (instancetype)initWithTitle:(nullable NSString *)title
                cancelButtonTitle:(nullable NSString *)cancelButtonTitle
                       didDismiss:(nullable LCActionSheetDidDismissHandler)didDismissHandler
            otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray;
    
    @end
    

3.1.1

7 years ago
  • 新增属性:

    @interface LCActionSheetConfig : NSObject
    
    // LCActionSheetConfig shared instance.
    @property (class, nonatomic, strong, readonly) LCActionSheetConfig *config;
    
    @end
    
  • 下列方法已不推荐使用,建议使用新的属性代替:

    @interface LCActionSheetConfig : NSObject
    
    // LCActionSheetConfig shared instance.
    + (instancetype)shared __deprecated_msg("Method deprecated. Use property `config` instead.");
    
    @end
    

3.1.0

7 years ago
  • 新增属性和方法:

    @interface LCActionSheet : UIView
    
    // Auto hide when the device rotated. Default is NO, won't auto hides.
    @property (nonatomic, assign) BOOL autoHideWhenDeviceRotated;
    
    // Append button at index with title.
    - (void)appendButtonWithTitle:(nullable NSString *)title atIndex:(NSUInteger)index;
    
    // Append buttons at indexes with titles.
    - (void)appendButtonsWithTitles:(NSArray<NSString *> *)titles atIndexes:(NSIndexSet *)indexes;
    
    @end
    

    #34 & #35 by cochat.

  • 修改属性类型:

    @interface LCActionSheet : UIView
    
    @property (nullable, nonatomic, strong) NSSet<NSNumber *> *destructiveButtonIndexSet;
    
    // ->
    
    @property (nullable, nonatomic, strong) NSIndexSet *destructiveButtonIndexSet;
    
    @end
    
  • 修改方法命名:

    @interface LCActionSheet : UIView
    
    - (void)appendButtonTitles:(nullable NSString *)buttonTitles, ... NS_REQUIRES_NIL_TERMINATION;
    
    // ->
    
    - (void)appendButtonsWithTitles:(nullable NSString *)titles, ... NS_REQUIRES_NIL_TERMINATION;
    
    @end
    

3.0.0

7 years ago
  • 更正方法命名:

    *Handle -> *Handler
    

    如:

    LCActionSheetClickedHandle -> LCActionSheetClickedHandler
    
  • 调整警示按钮默认颜色:

    RGB(255, 10, 10) -> RGB(254, 67, 37)
    

2.7.6

7 years ago
  • 修复 UIImage 类别中的方法名可能与其他库冲突的潜在问题。#33 by cwwise

    @interface UIImage (LCActionSheet)
    
    + (nullable instancetype)imageWithColor:(UIColor *)color;
    
    // ->
    
    + (nullable instancetype)lc_imageWithColor:(UIColor *)color;
    
    @end
    
  • 修正 LCActionSheet 中部分方法的注释。

2.7.4

7 years ago
  • 修复在 iOS 8 及以下的系统中,关闭 LCActionSheet 后旋转屏幕出现的崩溃。#32 by Amztion