xcode - How to display an object created in one class in another class in Objective-C? -


i have created uipickerview in view controller called activitylevelpickerviewcontroller. want picker view display in view controller called registerviewcontroller.

how call picker view in registerviewcontrller?

there 2 options. 1 copy on code related pickerview activitylevelpickerviewcontroller registerviewcontroller. other option create new uipickerview subclass , move code related populating rows there. nice thing creating subclass if want make change picker, can change once rather in every view controller. property declaration this:

@property (weak, nonatomic) iboutlet mypickerviewsubclass *pickerview; 

don't forget import picker view subclass in view controller if go subclassing option.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -