摘要: <!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> 阅读全文
posted @ 2016-03-15 22:30 Gabriel_Lee 阅读(165) 评论(0) 推荐(0)
摘要: @synthesize will generate getter and setter methods and corresponding instance variable for your property. @dynamic just tells the compiler that the i 阅读全文
posted @ 2016-03-09 18:21 Gabriel_Lee 阅读(135) 评论(0) 推荐(0)
摘要: NS_ENUM用于定义普通枚举值,NS_OPTIONS用于定义位移相关操作的枚举值: typedef NS_ENUM(NSUInteger, EOCConnectionState) { EOCConnectionStateDisconnected, EOCConnectionStateConnect 阅读全文
posted @ 2016-03-04 18:31 Gabriel_Lee 阅读(279) 评论(0) 推荐(0)
摘要: 在实现文件(.m文件)中使用static const来定义“只在编译单元内可见的常量”(只在.m文件内可见),由于此类常量不在全局符号表中,所以无须为其名称加类名前缀(一般以k开头)。 在头文件中使用extern来声明全局常量,并在相关实现文件中定义其值,这种常量会出现在全局符号表中,所以其名称应以 阅读全文
posted @ 2016-03-04 18:19 Gabriel_Lee 阅读(143) 评论(0) 推荐(0)
摘要: You #import or #include when there is a physical dependency. Otherwise, you use forward declarations (@class MONClass, struct MONStruct, @protocol MON 阅读全文
posted @ 2016-03-04 18:01 Gabriel_Lee 阅读(152) 评论(0) 推荐(0)
摘要: 一般来说,若需要独立添加一个UIView,使其覆盖于整个应用窗口之上,是这样实现的: AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate]; [app.window addSubview:view 阅读全文
posted @ 2016-03-02 11:53 Gabriel_Lee 阅读(1429) 评论(0) 推荐(0)