Swift 中更好的断言。
Carthage
github "GuanshanLiu/AssertPack"
添加到 Cartfilecarthage update
CocoaPods
pod 'AssertPack'
手册
Assert.swift
文件复制到您的项目中(推荐)AssertPack
作为框架使用。var people: [String] = [
"Tom",
"Jone",
"Steve",
"Jack"
]
var checked = [String]()
for name in people {
if !assertTrue(name != "Steve", "Steve is not allowed to get in") {
continue
}
checked.append(name)
}
v0.1 初始版本