Skip to content

Releases: iTofu/LCActionSheet

V 3.2.4

29 Jun 04:49
Compare
Choose a tag to compare
  • 添加属性来控制 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

V 3.2.3

05 Jun 10:52
Compare
Choose a tag to compare
  • 修复使用 prefersStatusBarHidden 方式设置状态栏隐藏在 LCActionSheet 中未生效的问题。#42 by devjia

V 3.2.2

12 May 06:10
Compare
Choose a tag to compare
  • 修复使用 preferredStatusBarStyle 方式设置状态栏样式在 LCActionSheet 中未生效的问题。#38 by LuYu001

V 3.2.1

28 Apr 07:39
Compare
Choose a tag to compare

V 3.2.0

27 Apr 07:36
Compare
Choose a tag to compare
  • 思来想去,还是恢复了“黑”状态栏的样式。现在 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

V 3.1.1

26 Apr 11:17
Compare
Choose a tag to compare
  • 新增属性:

    @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

V 3.1.0 (⚠️ API Updated)

26 Apr 04:55
Compare
Choose a tag to compare
  • 新增属性和方法:

    @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

V 3.0.0 (⚠️ API Updated)

24 Apr 05:43
Compare
Choose a tag to compare
  • 更正方法命名:

    *Handle -> *Handler
    

    如:

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

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

V 2.7.6

15 Apr 16:47
Compare
Choose a tag to compare
  • 修复 UIImage 类别中的方法名可能与其他库冲突的潜在问题。#33 by cwwise

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

V 2.7.4

13 Apr 03:01
Compare
Choose a tag to compare
  • 修复在 iOS 8 及以下的系统中,关闭 LCActionSheet 后旋转屏幕出现的崩溃。#32 by Amztion