摘要: main: 1 #import 2 #import "Location.h" 3 #import "Rectangle.h" 4 5 int main(int argc, const char * argv[]) { 6 @autoreleasepool { 7 Loca... 阅读全文
posted @ 2016-01-06 20:52 零点五 阅读(229) 评论(0) 推荐(0) 编辑
摘要: main: 1 #import 2 #import "Animal.h" 3 #import "Fish.h" 4 #import "Bird.h" 5 6 void doAction(Animal *ani) 7 { 8 [ani action]; //用父... 阅读全文
posted @ 2016-01-06 20:49 零点五 阅读(170) 评论(0) 推荐(0) 编辑
摘要: #define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])只需要在#import之前添加以上代码,就可以去掉讨厌的时间戳和进程ID啦~ 阅读全文
posted @ 2016-01-06 20:42 零点五 阅读(175) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { int a=6; float b=7.8; double d=5.6; NSInteger c=9;... 阅读全文
posted @ 2016-01-06 20:37 零点五 阅读(425) 评论(0) 推荐(0) 编辑
摘要: 1 #import 2 3 int main(int argc, const char * argv[]) { 4 @autoreleasepool { 5 //判断字符串前缀 6 NSString *str1=@"iOS-study"; 7 ... 阅读全文
posted @ 2016-01-06 20:26 零点五 阅读(2319) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //创建字符串常量 NSString *str1=@"char1"; //实例方法创建 NSStri... 阅读全文
posted @ 2016-01-06 15:14 零点五 阅读(355) 评论(0) 推荐(0) 编辑