2011年10月28日

parrentViewController, presentingViewController

又遇到一個 5.0 的改變......

參考官方網頁對 parrentViewController 的說明

Prior to iOS 5.0, if a view did not have a parent view controller and was being presented modally, the view controller that was presenting it would be returned. This is no longer the case. You can get the presenting view controller using the presentingViewController property.

嗯,這又怎樣呢?

2011年10月21日

Crash while calling deleteRowAtIndexPaths:withRowAnimation on UITableView

喔耶又踩一個洞 -_-

deleteRowAtIndexPaths 砍完好像是會 call 一次 row count 做檢查
所以一定要先把 data source 的東西砍了再去 call deleteRowAtIndexPaths
不然就等著接 exception -_-

Calling sequence of presenting a UIViewController on iOS


哈哈哈中鏢了
iOS5 改了 calling sequence
反正都查了就記一下......

當一個  UIViewController 要出現的時候
iOS 4.3  會按順序 call 這些東西
shouldRotate
didLoad
shouldRotate
didRotate
willAppear
didAppear

啊 5.0 改成這樣
shouldRotate
didLoad
shouldRotate
willAppear
shouldRotate
didAppear

我覺得 4.3 看起來比較有道理耶 -.-a