Skip to content

如何给html里的图片添加点击事件? #4

Description

@kakashilw

你好,我看了你的示例代码,里面有把html转变成NSAttributedString的方法

NSAttributedString *attributeString = [NSAttributedString htmlString:html];
......
cell.textLabel.attributedText = attributeString;

但是,如果html里面有图片,比如

<img src=“https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1574248377078&di=cf53e56d95c97225082e2063d94fb151&imgtype=0&src=http%3A%2F%2Fi1.sinaimg.cn%2Fent%2Fd%2F2008-06-04%2FU105P28T3D2048907F326DT20080604225106.jpg” />

要如何给这个图片添加点击事件呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions