spacing in uitextfield code example
Example: spacing in uitextfield
//swift 2.0
textfield.defaultTextAttributes.updateValue(spacing, forKey: NSKernAttributeName)
//swift 3.0
yourField.defaultTextAttributes.updateValue(36.0,
forKey: NSAttributedString.Key.kern)