iPhone CoreText: Find the pixel coordinates of a substring

后端 未结 4 1672
故里飘歌
故里飘歌 2021-01-30 19:09

Here\'s a screenshot of the twitter app for reference: http://screencast.com/t/YmFmYmI4M

What I want to do is place a floating pop-over on top of a substring in an NSAtt

4条回答
  •  死守一世寂寞
    2021-01-30 19:35

    I've been working on a small library that does exactly that. You can find it here: https://github.com/pothibo/CMFramework

    However, this library is in its alpha stage, there's optimization needed and some feature are lacking (line height is one of the urgent feature I want to add)

    If you decide to use it and find issue, don't hesitate to post issues on github!

提交回复
热议问题