[英]Xcode How can I replace text with a hyperlink
I am a newbie to Xcode so please bear with me. 我是Xcode的新手,所以请多多包涵。
I have a requirement where I have a some text on my view which is loaded from API call to server. 我有一个要求,我的视图上有一些文本,这些文本是从API调用加载到服务器的。 ( in short dynamic text populated runtime).
(简而言之是动态文本填充的运行时)。
Now I need to replace all @blabla and #blablabla to clickable links / buttons or anything else. 现在,我需要将所有@blabla和#blablabla替换为可点击的链接/按钮或其他任何东西。 It should be clickable and on click of it, should open another view.
它应该是可单击的,单击它应打开另一个视图。
Please suggest if I should elaborate a bit more on this. 请建议我是否应该对此进行详细说明。
Here is the use case to be more specific 这是更具体的用例
The cheater method is to use an Open Source component. 作弊者的方法是使用开源组件。 I've not used it, but SMFancyText might do the trick.
我没有使用它,但是SMFancyText可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.