Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.4k views
in Technique[技术] by (71.8m points)

xcode - Text View is altering input characters

I have a text view that replaces "--" with "-" automatically. I have everything disabled on the text view except for "editable" and "selectable". I'm using the storyboard interface builder. Any help?

Thank you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

NSTextView overrides the settings in the storyboard with the user preferences. If you want to override the user preferences then change the settings in code in viewDidLoad.

textView.isAutomaticDashSubstitutionEnabled = false

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.6k users

...