UITableViewRowAction title as image icon instead of text

前端 未结 8 1958
谎友^
谎友^ 2020-12-07 22:53

I want put the icon (image) instead of text in swipe actions in tableviewCell in Swift.

But i dont how to put the image instead of title text?

My code is be

8条回答
  •  自闭症患者
    2020-12-07 23:34

    trailingSwipeActionsConfigurationForRowAtIndexPath works from iOS 11 only and is completely not customizable. You can change background color of a button, but you cannot add an image with you own colors even if you use UIImageRenderingModeAlwaysOriginal.

    I ended up using MGSwipeTableCell.

提交回复
热议问题