To run the example project, clone the repo, and run pod install
from the Example directory first.
PoporUI is available through CocoaPods. To install it, simply add the following line to your 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: 点击空白处关闭键盘,键盘高度变化接口)。
UINavigationController 增加静态方法 statusBarHeight
UIButton+pLayoutCustom: 取消该class方法. 至少在iOS13的虚拟机无法正确运行,所以取消这里的方法了.(不适用category, 使用单独定义的UIButton可以正常运行)
更新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兼容的问题.
1.26 IToast 不再使用宏, 改为inline的c函数, 可以检查参数是否合法, 有点类似swift函数
1.31 增加了UITableView+pSafe方法, 预防同一个CellID应对多个Cell.
1.33 适配pod验证
1.34 view生成截图函数增加了参数, 之前的默认NO.
1.35 优化alertToast 参数
1.36 更新UIImage+create方法, 默认scale为1, 防止图片太大消耗内存. 背景色默认不设置.
1.37 UIScrollView 删除有问题的代码, 影响稳定.
1.38 更新吐司逻辑: 延迟控制时间变为0.05秒, 并且可控制. 不再是0.5秒,延迟太高了. hide之后执行移除操作.
popor, 908891024@qq.com
PoporUI is available under the MIT license. See the LICENSE file for more info.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。