PoporUI
示例
为了运行示例项目,克隆仓库,然后首先从 Example 目录运行 `pod install`。
要求
安装
PoporUI 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中:
pod 'PoporUI'
兼容iOS和macOS系统
~~BlockView : iOS8以前的UIAlertView、UIActionSheet采用block模式~~
IToast : 整理了IToast,import IToastPTool.h 使用AlertToastTitle(title),弹出键盘弹出的时候IToast弹出高度自动上移。
ProgressView : 使用了 https://github.com/gin0606插件。
Response : 根据UIResponder传递事件。
Tool : 包含磁盘空间、设备使用权限、保存图片、APP版本号等信息。
UIButton : 主要是UIButtonLayoutCustom,通过block方式自定义UIButton图片文字frame。
UIDeviceScreen : 获取是否是iPhoneX设备接口。
UIImage : 根据UIColor、NSString、UIFont、UIImage、UIView生成图片,渐变色图片,
- 更改UIImage填充色和背景色,保存图片到指定路径,读取绝对路径图片,压缩图片(指定最大容量、根据size压缩)。
UILabel : 根据UIString、UIFont或者NSAttributedString计算size,
- UILabelInsets,UILabelPhone。
UINavigationController : 根据Class、index移除某个UIViewController。
UIScrollView : 滑动到最底部,包含 UIScrollView 的VC支持侧滑。
UITableView : UITableViewCell 设定分割线inset。
- 侧滑VC的时候,UITableViewCell跟随滑动渐变色。
UITextField : UIInsetsTextField,UITextField最大输入文字,可以使用RAC替换。
UITextView : UIPasteImageTextView,
- UIPlaceHolderTextView,
- UITextView (MaxLength),
- UITextView (Size)
UIView : UIView (Extension)
UIViewController : UIViewController (AC: iPad弹出UIAlertControl sheet 模式的时候不崩溃,设定默认popPresenter.sourceRect),
- 设定导航栏按钮,
- 导航栏是否隐藏BOOL,
- UIViewController (TapEndEdit: 点击空白处关闭键盘,键盘高度变化接口)。
0.0.46
UINavigationController 增加静态方法 statusBarHeight
1.11
UIButton+pLayoutCustom: 取消该class方法. 至少在iOS13的虚拟机无法正确运行,所以取消这里的方法了.(不适用category, 使用单独定义的UIButton可以正常运行)
1.13
更新UILabel+pFormat, UITextField+pFormat
1.15 适配swift: int > NSInteger, float > CGFloat
1.16 摘自:https://github.com/wode0weiyi/MethodChaining 增加了UIAlertController的链式编程.
1.18 更新UIButton的UIButton+pUIEdgeInsets.
1.19 UIButton+pUIEdgeInsets 可以处理NSAttributedString.
1.22 适配xcode12, ios和macOS兼容的问题.
作者
许可证
PoporUI 在MIT许可证下可用。更多信息请参阅LICENSE文件。