UITextView 上奇怪的警告消息
有人遇到过为 iPhone 构建的警告消息吗? 更重要的是你知道如何解决它吗?
“不支持的配置数据检测和可编辑”
这似乎是 UITextView 在抱怨。 这是一个屏幕截图。
Has anyone run across this warning message building for the iPhone?
More importantly do you understand how to fix it?
"unsupported configuration data detection and editable"
It's seems to be the UITextView that is complaining.
Here's a screenshot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
问题是您将文本视图设置为可编辑 + 来检测/自动链接电话号码、事件、地址等。文本区域可以是可编辑的并且不可检测/自动链接文本,或者它可以自动链接文本但不可编辑。
该文本视图的设置应如下所示:
或
但不像:
The problem is that you have that textview set both to editable + to detect/autolink phone numbers, events, addresses, etc. a text area can either be editable and not detect/autolink text, or it can autolink text but not be editable.
Your settings for that textview should look like:
or
but not like:
我认为在你的场景中,文本输入仅用于输入文本,仅此而已。然后,当它被呈现回来时,“呈现文本视图”将负责检测潜在的信息......日期、事件等。
更准确地说:在一个简单的应用程序场景中,用户输入一些文本(比方说事件输入文本视图 - 此时无需检测)。然后,当它最终呈现给他或其他用户(比方说事件的详细视图)时,文本将呈现在“不可编辑”文本视图中,进而能够进行检测。
I think in your scenario, the text input is only used to input text, nothing more. Then when it get's presented back, the "presenting text view" will take care of detecting the potential information... dates, events, etc.
To be more precise : in a simple app scenario, a user types in some text (let's say an event input text view - with no detection necessary at this point). Then when it get's eventually presented back to him or another user (let's say the detail view of the event), the text will be presented back in a "non-editable" text view that in turn will be able to have detections.
我知道这个问题有点老了,但这就是我解决它的方法;
在 Interface Builder 中,我选择了链接检测,未选择可编辑行为。
然后,在我的 ViewController 中,我实现了 UITextView
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView { }
委托方法并返回 NO
。它删除了警告并阻止用户编辑 UITextView 的内容。
I know this question is a little old, but this is how I resolved it;
In Interface Builder I have Links Detection selected, and Editable Behaviour not selected.
Then, in my ViewController, I implemented the UITextView
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView { }
delegate method andreturn NO
.It removed the warning and prevents the user from being able to edit the UITextView's content.