I am creating an app that requires the use of a USB Keyboard. (The normal touch screen keyboard has been disabled and will not show up.) When the user installs the app for t
There is no clean way to do this (that I know of), but it can be done by placing a white image over were the caps lock appears.
This way, the caps lock image will always be hidden.
Make sure to place the NSImageView control after the NSSecureTextView control (in the UI Builder), so the image will be drawn after the NSSecureTextView control is drawn.
You can add Images to the textfiled like in the way given in the sample code given below:
Swift add icon/image in UITextField
But to check if you caps lock is on or not, I think there isn't any proper way to do that. Maybe you can check in "textFieldShouldReturn" method if the typed character is uppercase or lower case, every-time time when user types a character.
Adding a dummy view to the rightView did the trick. Thanks for the input.
textField.rightView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 0))