开发者

can I call a select method from UIResponderStandardEditActions?

I'm currently developing a simple text editing app for iPad using UITextView. I want to select parts of UITextView's text and highlight it with a default blue selection bar.

For example, I wrote this code to select the entire document.

[myTextView select: self]
myTextView.selectedRange = NSMakeRage(0, [textView.text length])

But "select" method is from UIResponderStandardEditActions protocol described as an informal protocol in the Apple documentation. http://developer.apple.com/library/ios/#documentation/uikit/reference/UIResponderStandardEditActions_Protocol/UIResponderStandardEditActions.html

I wonder whether it's legal to call this method directly because mos开发者_运维知识库t text editing apps based on UITextView in AppStore didn't have functionality to select parts of UITextView. So calling methods from UIResponderStandardEditActions seems illegal.

Thanks!


If it is in the documentation, you can use it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜