摘要: Objective-C Protocols 1.1 Formal Protocols A formal protocol (like an informal protocol) is a named list of methods and properties. formal protocol (像informal protocol)是一系列方法和属性的名字列表。 However, a ... 阅读全文
posted @ 2015-05-11 09:32 巴山夜雨1989 阅读(274) 评论(0) 推荐(0)
摘要: Objective -C Categories The dynamic runtime dispatch mechanism employed by Objective-C lets you add methods to existing classes. 被Objective -C 采纳的动态运行分配机制让你可以在已有的类中添加方法。 1.1 Creating a Category 创建... 阅读全文
posted @ 2015-05-10 17:57 巴山夜雨1989 阅读(366) 评论(0) 推荐(0)
摘要: Objective-C Properties Apple introduced properties, a combination of new compiler directivesand a new attribute accessor syntax. Apple 引入了属性这一概念。新的编译器命令和新的属性存取句法。 1.1 Shrinking the Interface 减少interfa... 阅读全文
posted @ 2015-05-09 12:56 巴山夜雨1989 阅读(345) 评论(0) 推荐(0)
摘要: iOS programming UITabBarController 1.1View controllers become more interesting when the user's actions can cause another view controller to be present... 阅读全文
posted @ 2015-05-08 16:37 巴山夜雨1989 阅读(312) 评论(1) 推荐(0)
摘要: iOS Programming View Controllers 视图控制器 1.1 A view controller is an instance of a subclass of UIViewController. 一个view controller 是一个UIViewController的子类。 A view controller manages a view hierarchy. ... 阅读全文
posted @ 2015-05-08 11:36 巴山夜雨1989 阅读(376) 评论(0) 推荐(0)
摘要: iOS Programming Views :Redrawing and UIScrollView 1.1 event You are going to see how views are redrawn in response to an event. 你将看到view如何响应event的。 You declared properties in header files. You ca... 阅读全文
posted @ 2015-05-07 22:34 巴山夜雨1989 阅读(290) 评论(0) 推荐(0)
摘要: iOS Programming View and View Hierarchy 视图和视图等级 1.1(1)File → New → Project.. From the iOS section, select Application, choose the Empty Application template, and click Next. 1.2 View Basics (1... 阅读全文
posted @ 2015-05-07 15:44 巴山夜雨1989 阅读(486) 评论(0) 推荐(0)
摘要: Objective -C Object initialization对象初始化 1.1 Allocating Objects分配对象 Allocation is the process by which a new object is born. allocation是新对象诞生的过程。 Sending the alloc message to a class ca... 阅读全文
posted @ 2015-05-06 18:05 巴山夜雨1989 阅读(378) 评论(0) 推荐(0)
摘要: Objective-C Memory Management Being Exceptional 异常处理与内存 3.1Cocoa requires that all exceptions must be of type NSException cocoa需要所有的异常是NSException类型的。 so even though you can throw an exc... 阅读全文
posted @ 2015-05-06 16:07 巴山夜雨1989 阅读(305) 评论(0) 推荐(0)
摘要: Objective-C Memory Management内存管理 2 2.1 The Rules of Cocoa Memory Management 内存管理规则 (1)When you create an object using new, alloc, or copy, the object has aretain count of 1. You are respon... 阅读全文
posted @ 2015-05-06 13:51 巴山夜雨1989 阅读(906) 评论(0) 推荐(0)