我一直在網上查找,試圖找出UICollectionViewCell
的視圖層次結構。在UICollectionViewCells中的contentView上方或下方顯示selectedBackGroundView?
我知道它有一個contentView
a selectedBackgroundView
和backgroundView
。 從我所瞭解的backgroundView
就在後面。但是在UICollectionViewCell
的情況下selectedBackgroundView
在contentView
之後或之前。
對於UITableViewCell
,這個視圖層次結構的順序也是一樣的嗎?
謝謝!並且內部實現是否將'selectedbackgroundview'添加到'UICollectionCellView'的層次結構中?或者你需要自己添加嗎?提前致謝。 –
是的,我相信iOS會照顧你,因爲你只需要設置單元格的屬性。 此外,如果答案有幫助,您能否將其標記爲「正確」? – Fahim