一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
Nullability
参考:Nullability and Objective-C - Swift Blog - Apple Developer
Lightweight Generics
得益于 Nullability & Lightweight Generics,现在 LCActionSheet 将会更安全地融入 Swift。
新增 LCActionSheetConfig 类,用来统一配置 LCActionSheet 的样式(参数),使用方式见 Usage。#29 by Abel94。
添加 titleEdgeInsets
属性,默认值 UIEdgeInsetsMake(15.0f, 15.0f, 15.0f, 15.0f)
,#29 by Abel94:
@interface LCActionSheet : UIView
@property (nonatomic, assign) UIEdgeInsets titleEdgeInsets;
@end
重写 LCActionSheet 初始化逻辑。
重写线条和阴影效果,采用加载颜色而不是加载图片的方式。
cancelButtonTitle
为 nil
或 @""
来不显示取消按钮,这是一个 Tip,并不是一个 Feature。。。cancelButtonIndex
始终返回 0
。