摘要: 下面的语句都是我亲自试验过的,保证可以运行出来。UILabel *label = [[UILabel alloc] init]; NSString *text = @"这是一个测试!!"; label.text = text; label.numberOfLines = 0; UIFont ... 阅读全文
posted @ 2015-09-11 13:48 凌风4819 阅读(514) 评论(0) 推荐(0)
摘要: 最近突然想写一个2048的小游戏,由于全部是自定义控件,所以程序看起来冗杂,但是核心的算法部分还是很不错的,大家感兴趣的可以仔细看看。声明部分:#import @interface ViewController : UIViewController@property(nonatomic,strong... 阅读全文
posted @ 2015-09-11 10:36 凌风4819 阅读(200) 评论(0) 推荐(0)
摘要: 简述:Cocoa框架中的NSPredicate用于查询,原理和用法都类似于SQL中的where,作用相当于数据库的过滤取。定义(最常用到的方法):[cpp]view plaincopyNSPredicate*ca=[NSPredicatepredicateWithFormat:(NSString*)... 阅读全文
posted @ 2015-09-11 10:11 凌风4819 阅读(119) 评论(0) 推荐(0)