UIButton default tap fade animation missing in UITableViewController custom cell

后端 未结 6 933
后悔当初
后悔当初 2021-02-08 08:41

I have a custom cell with a few UIButtons in it. I have created Target Actions like so on the buttons:

[cell.customLocationButton addTarget:self action:@selector         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-08 09:24

    Another thing you can do is:

    Swift:

    button.showsTouchWhenHighlighted = true
    button.setTitleColor(UIColor.blueColor(), forState: .Normal)
    button.setTitleColor(UIColor.lightGrayColor(), forState: .Selected)
    

提交回复
热议问题