开发者

Can I use the text correction ui element on a normal UIView

I'd 开发者_StackOverflow社区like to use the text correction ui element in my own UIView. Is this allowed & possible? If so, how can I use the element?

Clarification: I don't want to use it as a text correction feature. I want to use it as UI elements to show multiple (dismissable) tags on a UIView to show & modify predicate settings.


You can use UIMenuController, which might be close to what you want (it's the thing that shows the Cut/Copy/Paste/Replace menu in text fields). See the CopyPasteTile and Touches sample code for details.

If you actually mean the thing that pops up with spelling completion suggestions, then no, you can't easily use it. You'll have to create custom buttons as you mentioned above. But, try downloading and running UIKit Artwork Extractor to help with getting UIKit artwork to match the look of your custom buttons.


Text correction? Do you meant the auto-complete / correct features you get when you type text on iOS? If so, you get that for free as part of UITextField or UITextView, so the answer would be yes. You can define exactly what you want corrected as part of the properties of those two classes.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜