Xcode ios: how to costumize a ui item, and apply that to all viewcontrollers? -
i have uitextfield, had costumized in firstviewcontroller. wan't have same behavior on other viewcontrollers. there anyway import propreties on iboutlet?
thanks!
simple create own customclass , set property in constructor.
@interface customtextfield : uitextfield @end @implementation customtextfield - (id)initwithframe:(cgrect)frame { self = [super initwithframe:frame]; if (self) { //customize here self.autocapitalizationtype = uitextautocorrectiontypedefault; self.text = @"blub"; .... } return self; } @end if create new textfield, create object custom class:
customtextfield *field = [[customtextfield alloc] initwithframe: ...];
Comments
Post a Comment