开发者

Create buttons from a text array

Sorry I can't think of a good title for this but here' my situation: I have bunch of text in a UITextView, and I want开发者_JAVA技巧 some words to becomes buttons (the list of words can be in an array)...and basically, when the user clicks these buttons, it will push a uiviewcontroller on the nav controller displaying details about that word....

My main problem is: How can I make these select words buttons? What the best way to do this? Thanks


If you don't need editing of the text I suggest using a UIWebView and making those words links. Then implement the UIWebViewDelegate method: webView:shouldStartLoadWithRequest:navigationType: and catch clicking of a link with it. Then show your viewcontroller.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜