CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

SNTool 0.1.7

SNTool 0.1.7

Maintained by snlo.



SNTool 0.1.7

  • By
  • snlo

SNTool

一些常用的代码片段的集合,不定时更新。你也可以把你的代码片段添加进来。

Features

  • 系统弹窗兼容到iOS 8
  • MBProgressHUD的统一处理,自定义视图替换MBProgressHUD
  • NSString、UIColor处理
  • UIViewController堆栈寻址
  • 常见义务类型正则
  • 高斯模糊加工
  • 导航栏、标签栏、状态栏高度
  • 本地国际化
  • 安全单例工厂
  • RunTime扩展
  • Protocol在OC中的POP实现
  • 安全Category

使用

详细API参见SNTool.h,下面是使用样例:

#import <SNTool.h>
///
[SNTool showAlertStyle:UIAlertControllerStyleAlert title:@"title" msg:@"msg" chooseBlock:^(NSInteger actionIndx) {
        if (actionIndx == 0) {
            NSLog(@"cancel");
        } else if (actionIndx == 1) {
            NSLog(@"done");
        }
    } actionsStatement:@"cancel",@"done", nil];

安装

pod 'SNTool'

要求

iOS 8.0 或者更高版本

说明

部分源码来自libextobjc

依赖的第三方库MBProgressHUD,后期可能会移除

License

SNTool is released under the MIT license. See LICENSE for details.