**:
今天看到很多人提到,在ios7中,使用uitableview的時候,對於cell要注意:[cell addsubview:usertextfield] 這種用法不能再用了,應該使用 [cell.contentview addsubview:usertextfield] 的方式。
如某人就遇到這種問題:
調查了一下原因:現在的uitableviewcell包含了乙個scrollview。下面乙個文章中也有介紹:
uitableviewcell的定製。
以前可以直接繼承uitableviewcell然後drawrect;
現在不行了,現在的uitableviewcell包含了乙個scrollview,你重繪了uitableviewcell將會被這個scrollview遮住而完全沒法顯示.
解決思路:
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath
iOS7中UITableView中cell的使用
分類 ios oc 2013 09 26 15 01 3099人閱讀收藏 舉報 今天看到很多人提到,在ios7中,使用uitableview的時候,對於cell要注意 cell addsubview usertextfield 這種用法不能再用了,應該使用 cell.contentview adds...
iOS7中UITableView的變化
1 uitableviewcell取消了 cell addsubview這個方法,只能使用 cell.contentview addsubview這個方法。因此之前的專案在xcode5上面執行可能會出現以前的cell上的button無法響應的情況,這時,只需要把這個方法改過來就行了,xib預設是使用...
IOS7中UITableView的變化
1 uitableviewcell取消了 cell addsubview這個方法,只能使用 cell.contentview addsubview這個方法。因此之前的專案在xcode5上面執行可能會出現以前的cell上的button無法響應的情況,這時,只需要把這個方法改過來就行了,xib預設是使用...