Siva Kumar Aketi
Siva Kumar Aketi

Reputation: 7

I want to add image and text side by side in a trailingSwipeActionsConfigurationForRowAt and leading swipe action when swipe in a tableview swift

I know when we set the height of cell to 91 it shows both image and text vertically but I want horizontally side by side without setting height.

Upvotes: -1

Views: 246

Answers (2)

Siva Kumar Aketi
Siva Kumar Aketi

Reputation: 7

there is trick we can do that in existing image view in swipe like deleteAction.image = textToImage(inImage: UIImage(named: imageName)!, drawText: imageTitle, atPoint: CGPoint(x: 0, y: 0)) you need to create your own function textToImage

Upvotes: 0

Valentina Konatar
Valentina Konatar

Reputation: 277

You won't be able to do it with UIContextualAction. Try making your own custom component if you really need it to look like that.

Upvotes: 0

Related Questions