我可以从 UIResponderStandardEditActions 调用 select 方法吗?
我目前正在使用 UITextView 为 iPad 开发一个简单的文本编辑应用程序。 我想选择 UITextView 文本的部分并使用默认的蓝色选择栏突出显示它。
例如,我编写了这段代码来选择整个文档。
[myTextView select: self]
myTextView.selectedRange = NSMakeRage(0, [textView.text length])
但“select”方法来自 UIResponderStandardEditActions 协议,在 Apple 文档中被描述为非正式协议。 http://developer.apple.com/library/ ios/#documentation/uikit/reference/UIResponderStandardEditActions_Protocol/UIResponderStandardEditActions.html
我想知道直接调用这个方法是否合法,因为AppStore中大多数基于UITextView的文本编辑应用程序没有选择部分UITextView的功能。因此从 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 most 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果文档中有的话,就可以使用。
If it is in the documentation, you can use it.