码迷,mamicode.com
首页 >  
搜索关键字:predicatewithformat    ( 34个结果
注册页面的各种判断(正则表达式)
1.密码判断 至少包含数字、字母(区分大小写)、符号中的2种 NSString *regex = @"^(?![A-Z]+$)(?![a-z]+$)(?!\\d+$)(?![\\W_]+$)\\S+$"; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"self matches %@",re...
分类:其他好文   时间:2014-09-04 19:05:50    阅读次数:210
正则表达式
1、判断用户名,在2-16位-(BOOL)CheckInput:(NSString *)_text{ NSString *Regex = @"^\\w{2,16}$"; NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF....
分类:其他好文   时间:2014-08-21 22:41:14    阅读次数:207
cocoa中的NSPredicate介绍
在COCOA中的NSPredicate表示的就是一种判断。一种条件的构建。我们可以先通过NSPredicate中的predicateWithFormat方法来生成一个NSPredicate对象表示一个条件,然后在别的对象中通过evaluateWithObject方法来进行判断,返回一个布尔值。...
分类:其他好文   时间:2014-07-20 21:29:58    阅读次数:207
CoreData用法三: NSPredicate在CoreData中的使用
NSPredicate在CoreData中常用作查询使用,相当于sql语句中的where查询子句。 最常用的方法为: NSPredicate *ca = [NSPredicate predicateWithFormat:(NSString *), ...]; 比如我们要查询student表中name=“jjy”的信息,我们可以这样去用NSPredicate NSEntityDescript...
分类:其他好文   时间:2014-06-05 10:43:20    阅读次数:269
34条   上一页 1 2 3 4
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!