I have a custom UITextField with a UIImage as a background. Now when I type in a text into this UITextField and the cursor is blinking I get this:

I don’t want to have a white image on the cursor blinking as it destroys the aesthetics.
I tried playing around with this and tried setting the background view to have the same color as the image, however the issue is that the UITextField shape is always a rectangle. How do I solve this?
Have you tried setting
textField.backgroundColor = [UIColor clearColor]?You can use a UIImageView for the image and then add a UITextField as a subview with clear background. Just create
UIImageView *imageViewandUITextField *textField, either programmatically or in the IB. If you go programmatically, use[imageView addSubview:textField];and set the frame as you like. In the IB, just drop thetextFieldonto theimageViewand align it as you like.