今天ios遇到一個bug, UITableView的contentOffset會在內容不滿一頁的時候被reset, 其他時候正常, 而且這個bug只在有tabbar的地方出現, 經過調試, 發現是UIViewAutoresizingFlexibleHeight導致的. 網上有人說改變UITableView的大小會導致contentOffset被reset, 看來這個也是這個原因了.
一些其他的資料:
iphone - iOS Keyboard Location and Orientation - Stack Overflow 這個可以學viber那樣讓鍵盤隨着tableview一塊滾動, 具體效果可以參考viber的聊天界面
http://stackoverflow.com/questions/10955888/ios-keyboard-location-and-orientation
Cocoapods一覧 很多實用的三方庫
http://matsu911.github.io/Mobile/2013/03/27/cocoapods-list/
ios - Is it possible to add observer to tableView.contentOffset? - Stack Overflow