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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -