Image in TableViewCell swipe action

后端 未结 3 907
一向
一向 2020-12-12 02:10

I have a swipe action to \'complete\' a task in my to-do list app. This is the image I have set:

However when the cell is swiped, the image looks like this:

3条回答
  •  盖世英雄少女心
    2020-12-12 03:07

    In iOS 13 with SF Symbol, simply use UIImageRenderingModeAlwaysOriginal to change the symbol color.

    replyAction.image = [[UIImage systemImageNamed: @"arrowshape.turn.up.left.circle.fill"] imageWithTintColor: self.view.tintColor renderingMode: UIImageRenderingModeAlwaysOriginal];
    

提交回复
热议问题