2
調查Custom UITableViewCell backgroundView & selectedBackgroundView後,我注意到的backgroundView
& selectedBackgroundView
每個層(分組的表視圖的每個單元的)具有CGImageRef
作爲其內容。CALayer是否獲取其內容?
必須Apple創建每個CGImageRef
並明確設置每個圖層的內容?
調查Custom UITableViewCell backgroundView & selectedBackgroundView後,我注意到的backgroundView
& selectedBackgroundView
每個層(分組的表視圖的每個單元的)具有CGImageRef
作爲其內容。CALayer是否獲取其內容?
必須Apple創建每個CGImageRef
並明確設置每個圖層的內容?
是的,UIGroupTableViewCellBackground
是其圖層的代表並將其圖層的contents
設置爲displayLayer:
。我通過使用setContents:
方法創建MyLayer : CALayer
來解決這個問題,在該方法中,我放置了一個斷點,並且實現了+[UIGroupTableViewCellBackground layerClass]
以返回[MyLayer class]
。然後,當斷點被擊中時,我檢查了回溯。
這是一個實現細節。爲什麼對你很重要?你的問題是什麼? – Costique 2012-02-18 07:40:18