摘要: 类的定义@interface FirstClass :NSObject@end//@interface表示声明的是一个类,“:”表示继承关系,@end类的结束类的实现@implementation FirstClass方法的声明+(void)print;-(id)init;//"+"表示声明的是一个... 阅读全文
posted @ 2015-11-13 19:39 An唯一 阅读(1314) 评论(0) 推荐(0)
摘要: 1.新建一个single view工程,导入ASIHttpRequest库,导入MobileCoreServices、CFNetwork、SystemConfiguration和libz1.2.5.dylib四个系统库2.随便导入一张图片,比如haoyou.png3.ViewController.h... 阅读全文
posted @ 2015-11-13 19:09 An唯一 阅读(175) 评论(0) 推荐(0)
摘要: 一、类Class中的属性property 在ios第一版中,我们为输出口同时声明了属性和底层实例变量,那时,属性是oc语言的一个新的机制,并且要求你必须声明与之对应的实例变量,例如:@interface MyViewController :UIViewController{ UIButton... 阅读全文
posted @ 2015-11-13 18:08 An唯一 阅读(229) 评论(0) 推荐(0)