本文介绍了Settings.bundle,输入验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以为Settings.bundle中的特定条目指定验证规则?例如,是否可以将文本字段限制为一组特定的字符?还是我必须提醒用户配置中是否存在垃圾"?
Is it possible to specify validation rules for a particular entry in a Settings.bundle? For instance, would it be possible to restrict a text field to a particular set of characters? Or do I have to alert the user if there is "garbage" in the configuration?
推荐答案
我相信您必须提醒用户输入了错误数据.除了plist值之外,没有任何其他方法可以将自己的代码添加到设置包中.
I believe you'll have to alert the user that they entered bad data. There isn't any way to add your own code to the settings bundle beyond the plist values.
这篇关于Settings.bundle,输入验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!