I\'m trying to style all the textfields like so:
CGRect frameRect2 = _lastname_field.frame;
frameRect2.size.height = 30;
_lastname_field.font = [UIFont font
Subclass UITextField and add your customization in the initWithFrame method. Add initWithCoder method in the custom class where you call the super and return [self initWithFrame:[self frame]]. Then change the class in Interface Builder for each text field.
It will be something like this:
// MyUITextField.h
@interface MyUITextField : UITextField {
// Your IVars
}
@property (retain, readonly) float value;
@end
// MyUITextField.m
@implementation MyClass
- (id)initWithCoder:(NSCoder *)decoder {
[super initWithCoder:decoder];
return [self initWithFrame:[self frame]];
}
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
// Your customization
}
}
@end