Change disclosure indicator color on cell selection

前端 未结 7 1813
甜味超标
甜味超标 2021-01-12 01:44

I\'ve read some posts on this, but still can\'t get the answer to my question.

I have a disclosure indicator. \"

7条回答
  •  太阳男子
    2021-01-12 02:18

    Swift 3

    Add a custom accessory view:

    Example 1:

    cell.accessoryView = UIImageView(image: UIImage(named: "accessory.png"))
    

    Example 2:

    Nested in an view container for a small source image:

    let accessoryView = UIView(frame: CGRect(x: 0, y: 0, width: 24, height: 50))
    let accessoryViewImage = UIImageView(image: UIImage(named: "accessory.png"))
    accessoryViewImage.center = CGPoint(x: 12, y: 25)
    accessoryView.addSubview(accessoryViewImage)
    
    cell.accessoryView = accessoryView
    

提交回复
热议问题