我有一個桌面單元格,我試圖附加一個AVPlayer。tableviewcell高度和框架大小?
- 創建的cellForRowAtIndexPath細胞 用於行= 8
- 設定高度是在heightforrowatindexpath 200,其它行使用默認高度
- 在cellforrowsatindexpath,如果行== 8,呼叫customCell方法,它創建avplayer和附加到cellview.contentview。我得到通過調用的cellForRowAtIndexPath的cellView:ROW8
然而,當我得到的細胞進行自定義8列,單元格的大小爲0 0 0 0作爲一個結果,我不能在avplayer視圖重視細胞。
這裏是控制檯日誌,請注意創建時的單元尺寸不爲零,但在customCellView返回0。任何想法?
heightforrowatindexpath: row = 8, height = 200.000000
cellForRowAtIndexPath: row=8
cell.contentView.frame = {{0, 0}, {320, 199.5}}, cell.frame = {{0, 352}, {320, 200}}
customCellView: customCell.contentView.frame ={{0, 0}, {0, 0}}, textlabel = (null)
customCell.frame ={{0, 0}, {0, 0}}
heightforrowatindexpath: row = 8, height = 200.000000
你能告訴我們創建單元的代碼嗎? –