我有一個大問題,我試圖調整一個單元格和它的兩個視圖內的單元格,我做到了,但它顯示緩慢UITableView
顯示時,我想這個正在發生,因爲細胞在出現之前應該做的所有事情。有什麼更好的方式來調整UITableView細胞組件的大小
這是一份簡歷是我在做什麼,以調整細胞及其內容:
- 調整使用
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- 調整細胞
- (void)sizeForContent:(UICustomView*)contentView andCommentView:(UIOtherCustomView*)commentView forMessage:(MessageObject*)message
- 內自定義視圖的單元格,在結束我調整內的標籤的第一
UIView
(我做的最後步驟 - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
)
它生成它應該,但表運行緩慢!
這是什麼,我的每個細胞內生成一個例子(第二個觀點是隻有在有資料顯示有顯示,第一個是始終顯示)
--------------------
| |
| First UIView |
| | UILabel | |
--------------------
| Second UIView |
| |
|----------------|
什麼是更好的調整單元格內所有組件大小的方法?有沒有辦法使用autolayout?
請出示的代碼,所以我們可以理解它到底是什麼,你正在做 – bengoesboom
OK,讓我把一些代碼在這裏。 – Gabox