首页 > 解决方案 > iOS UITextView with html contents, tap on image and zoom

问题描述

I’m developing a Swift iOS application to display simple HTML content (text and images) inside a UITextView (with attributedString of course). Text and images (plain img tags with remote images) are shown perfectly. I’d like at this point, to let the user tap on the images and display them full screen and full size on a new view controller.

Any help would be appreciated. I can intercept tap on images, following some old SO posts, but I can’t figure out how to “get” the image to pass to the new view controller.

Thanks.

标签: iosswiftuitextviewnsattributedstring

解决方案


推荐阅读