abcdefg12345

macrumors 6502
Original poster
Jul 10, 2013
280
86
Anyone knows how to stop this annoying behaviour on uitextView it keeps changing " into “

if tries all the following and it still doesn't work, I basically want the textview to not change anything the user enters

Swift:
self.autocorrectionType = .no
self.autocapitalizationType = .none
self.spellCheckingType = .no
self.smartQuotesType = .no
self.smartDashesType = .no
self.smartInsertDeleteType = .no
 

KALLT

macrumors 603
Sep 23, 2008
5,211
3,265
Can you provide some more context? Where are you setting these variables?
 
Comment

abcdefg12345

macrumors 6502
Original poster
Jul 10, 2013
280
86
Can you provide some more context? Where are you setting these variables?

I have a function that creates the textview and other interface elements that's where im setting them on, everything works except for the double straight quotes, they keep on changing as soon as I type them in.

interestingly though if I paste them in they don't change
 
Comment

KALLT

macrumors 603
Sep 23, 2008
5,211
3,265
Like a factory method on UITextView or a subclass (because of the reference to self)? Are you using them in Interface Builder? Have you checked the debugger to confirm that the properties are indeed set?
 
Comment

TheWatchfulOne

macrumors 6502a
Jun 19, 2009
576
537
I have a function that creates the textview and other interface elements that's where im setting them on, everything works except for the double straight quotes, they keep on changing as soon as I type them in.

interestingly though if I paste them in they don't change
The fancy quotes are what you get by default when you type quotes in iOS. To type the plain quotes, touch and hold the quote key and you will see a menu pop up from which you can select alternative characters including the plain quotes. Unless I've misunderstood what you are doing to get the fancy quotes?
 
Comment

abcdefg12345

macrumors 6502
Original poster
Jul 10, 2013
280
86
Like a factory method on UITextView or a subclass (because of the reference to self)? Are you using them in Interface Builder? Have you checked the debugger to confirm that the properties are indeed set?
I have tried both subclass with self and reference to textview name without subclass, I know my code is being applied to the text view because some things are working such as not capitalising first character but the quotes get replaced still.
[automerge]1576911783[/automerge]
The fancy quotes are what you get by default when you type quotes in iOS. To type the plain quotes, touch and hold the quote key and you will see a menu pop up from which you can select alternative characters including the plain quotes. Unless I've misunderstood what you are doing to get the fancy quotes?

It seems to be working on iOS however when I test it on macOS using catalyst it still replaces plain quotes with fancy quotes while im editing text
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.