开发者

How to add 'delete' icon to a UIImage?

开发者 https://www.devze.com 2023-03-19 18:02 出处:网络
My app requires an image uploader which either takes an image from the 开发者_StackOverflow社区user\'s iphone photo library or directly from the camera.

My app requires an image uploader which either takes an image from the 开发者_StackOverflow社区user's iphone photo library or directly from the camera.

My question: How can I add an 'delete' icon to the top left hand corner of the image (as seen in the screenshot below)?

How to add 'delete' icon to a UIImage?


1.You have to create a UIButton with the close image and position it at the top left corner of the image manually.

2.You can also create a UIImageView with the close image, adding a UITapGestureRecognizer to it, and position it at the top left corner.

0

精彩评论

暂无评论...
验证码 换一张
取 消