Fahim Parkar Fahim Parkar - 4 months ago 12x
Objective-C Question

custom height for rounded rectangle UITextField

I have UITextField of type RoundedRectangle. I want to set height to 50.

When I tried through IB, I see its disabled. When I change the type to rectangle, I see it enabled and I can change from there. I changed to 50 and changed the type again to RoundedRectangle. It again become, 30 height.

Any idea, how this can be done? Any help/ suggestions would be appreciated.


Set the textfield type to square rectangle in IB and set height to 50 and in code in viewDidLoad just say

[firstName setBorderStyle:UITextBorderStyleRoundedRect];