菜单

2012年12月10日杂记

關於ARC和MRC轉換ARC的教程:http://www.onevcat.com/2012/06/arc-hand-by-hand/

UIViewController,http://geeklu.com/2012/05/custom-container-view-controller/

總結了展示viewcontroller的四種途徑

  1. 设置成Window的rootViewController(iOS 4.0之前UIWindow并没有rootViewController属性,只能通过addSubview的方式添加一个View Controller的view)
  2. 使用某个已经存在的Container来展示,比如使用UINavigationController来展示某个View Controller [navigationController pushViewController:vc animated:YES];
  3. 以模态界面的方式展现出来 presentModalViewController
  4. 以addSubview的方式将使其view作为另一个View Controller的view的subView

直接使用4种方法是比较危险的,上一级 View Controller并不能对当前View Controller的 生命周期相关的函数进行调用,以及旋转事件的传递等。

放棄ios4:http://blog.devtang.com/blog/2012/11/16/drop-ios4-enbrace-ios5/

Objective-C的新特性:http://blog.devtang.com/blog/2012/08/05/use-modern-objective-c/

重構代碼

Appcode 值得一試,可惜太貴了.

之前不知道的debug表達式:http://www.onevcat.com/2011/12/debug-2/