导航

2014年3月26日

摘要: Setting a view controller as the rootViewController of a window adds that view controller’s view as a subview of the window (Figure 7.4). It also automatically resizes the view to be the same size as the window. Given what you learned in Chapter 6, you could write setRootViewController: yourself: - 阅读全文

posted @ 2014-03-26 21:03 0304 阅读(178) 评论(0) 推荐(0) 编辑

摘要: id Take another look at the initializer’s declaration; its return type is id (pronounced “eye-dee”). This type is defined as “a pointer to any object.” (id is a lot like void * in C.) init methods are always declared to return id. Why not make the return type BNRItem *? After all, that is the type o 阅读全文

posted @ 2014-03-26 20:35 0304 阅读(204) 评论(0) 推荐(0) 编辑