I have a strange problem. I have a UITextField in which the user must write the amount of something, so the field is called "amountField". Everything looks great when the user starts editing a text field, the text is in the vertical and horizontal center - that's great.
However, when the user finishes editing, the text rises a little. I tried a lot, nothing helped ...
I am adding screenshots below so you can understand what the problem is.
This is how it looks when editing a field - this is normal.

And this is how it looks when editing - this is a problem !

Please, if anyone knows what might cause this, I will be very grateful! :)
Here are some of my code related to the number of fields.
amountField.keyboardType = UIKeyboardTypeNumberPad; amountField.returnKeyType = UIReturnKeyDone; amountField.delegate = self; [amountField setFont:[UIFont fontWithName:@"Nuptial Script LT Std" size:30]]; amountField.borderStyle = UITextBorderStyleNone; UIImage *amountBg = [UIImage imageNamed:@"skin2_ipad_amountField.png"]; [amountField setBackground:amountBg]; amountField.rightView = nil;
PS: These white corners are, because I set the background to white with 0.2 alpha, which is good.
ios objective-c iphone uitextfield xcode
Dominik Hadl Mar 12 '12 at 20:45 2012-03-12 20:45
source share