Swift 断言

assert(条件,"输出信息");
如:
let age=-1;
assert(age>=0,"age要大于0");

posted @ 2015-11-23 13:30  如梦真心  阅读(196)  评论(0编辑  收藏  举报