Not displaying the title in Swipe actions for UItableView Swift 4

前端 未结 2 716
北恋
北恋 2021-01-15 19:56

I have set an action for \"add to cart\" at leading side of the UItableViewCell. I have set background colour, its image and title. below\'s my code.

 @avail         


        
2条回答
  •  我在风中等你
    2021-01-15 20:14

    UIContextualAction supports either text or image. By setting the image with setImage: property, basically remove the title when creating the object. If you want both text and image, you need to create images with embedded text.

    its the bug in UIContextualAction. It does not show both image and title at the same time unless the table view cell height is 91 points. for more info you get forums.apple

提交回复
热议问题