ios - Assigning a VC as Another VC's property in Segue, as Another VC's UIbutton Try to Add the VC (Now a property) as Target, Gone Wrong -


in custom segue of mine i've assigned vc_a (self.sourceviewcontroller) property of vc_b (self.destinationviewcontroller).

vc_b.property = (vc_aclass*) self.sourceviewcontroller; 

in vc_b i've #imported "vc_aclass" , declared correct class property.

@property(nonatomic)vc_aclass* property; 

i didn't forget synthesize (in m file) too;

@synthesize property; 

however, when try trigger method in vc_a using uibutton in vc_b (by adding target),

 uibutton* auibutton = [[uibutton alloc] initwithframe:frame]; [auibutton addtarget:property action:@selector(somemethod) forcontrolevents:uicontroleventtouchupinside]; 

it doesn't work , being newbie, couldn't seem understand why happening.

i thought i've done correct (which apparently didn't couldn't figure out part had gone wrong).

it great if can point out me i've gone wrong.


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -