Latest 0.0.4
Homepage https://github.com/YJManager/CommonParameter
License MIT
Platforms ios 8.0, requires ARC
Authors

CommonParameter

CommonParameter 包含 Swift 3.0+ 开发中常用的常量、变量以及常用方法等。

安装

支持 CocoaPods 安装:

  pod 'CommonParameter'

常量、变量、方法

常量、变量

1.屏幕的宽高
2.APP Bundle Identifier
3.APP 版本号
4.APP 编译版本号

常用方法

1.showAlertView()
2.call()

常用路径Path

  /// 获取沙盒(Documents)路径
  public let kYJ_DOCUMENTS_PATH: String = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]

  /// 获取沙盒(Library)路径
  public let kYJ_LIBRARY_PATH: String = NSSearchPathForDirectoriesInDomains(.libraryDirectory, .userDomainMask, true)[0]

  /// 获取沙盒(Cache)路径
  public let kYJ_CACHE_PATH: String = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0]

  /// 获取沙盒(Temp)路径
  public let kYJ_TEMP_PATH: String = NSTemporaryDirectory()

  /// 文件或者文件夹是否存在
  public func yj_fileExist(path: String) -> Bool{
      return yj_fileManager.fileExists(atPath: path)
  }
  ......

自动任务管理器

  public protocol AutoTaskProtocol: NSObjectProtocol {
      func cancel()
  }
  ......

自动创建拼音索引和排序

  public class AutoPinyinIndexer<T: NSObject>: NSObject {}

  public class AutoPinyinIndex<T: NSObject>: NSObject {}
  ......

Latest podspec

{
    "name": "CommonParameter",
    "version": "0.0.4",
    "summary": "CommonParameter u5305u542b Swift u5f00u53d1u4e2du5e38u7528u7684u5e38u91cfu3001u53d8u91cfu4ee3u66ffObjective-Cu4e2du7684u5b8f, Author's email:houmanager@Hotmail.com u5de5u4f5cu5730u70b9:BeiJing",
    "description": "CommonParameter u5305u542b Swift u5f00u53d1u4e2du5e38u7528u7684u5e38u91cfu3001u53d8u91cfu4ee3u66ffObjective-Cu4e2du7684u5b8f, Author's email:houmanager@Hotmail.com u5de5u4f5cu5730u70b9:BeiJing u6709u5174u8da3u7684u53efu4ee5u4e00u8d77u6765u641eu3002",
    "homepage": "https://github.com/YJManager/CommonParameter",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "houmanager": "houmanager@Hotmail.com"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/YJManager/CommonParameter.git",
        "tag": "0.0.4"
    },
    "source_files": "CommonParameter/*.{swift}",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This