iOS 8 UITableViewRowAction: Swipe Left, Images?

后端 未结 3 2197
青春惊慌失措
青春惊慌失措 2021-02-08 16:56

I\'ve just come across this new API on iOS8. I cannot however find any solution on if it is possible to use images instead of text and to allow left and right swipe? Is this eve

3条回答
  •  半阙折子戏
    2021-02-08 17:43

    No, I don't think it's possible to have a right swipe (with a UITableViewCell, anyway). However, you can use an image for the button by setting its background color using colorWithPatternImage:. The width of the button seems to be determined by the length of the title, so if you want to change the width (and not have any visible title), use a title that consists of as many spaces as you need.

提交回复
热议问题