开发者_运维百科I am developing an iphone app right now where i will be displaying an overview text with entries that can be found later in the app. I am wondering if there is a way to make a specific work clickable to send me to another screen that will display more information about the place that was clicked.
You can use this...
self.myTextView.dataDetectorTypes =UIDataDetectorTypeLink;
if you want active substring in your UITextView then you can use my extended TextView... its short and simple. You can edit it as you want.
how to use (range = substring location):
[self.textView addTapActionWithRange:range withActionBlock:^{
// anything you want to do - show something
}];
result:
source code: https://github.com/marekmand/ActiveSubstringTextView
精彩评论