ios - Setting properties on a UIView -
i need set property on uiview
uiviewcontroller
. sounds simple enough (moreplandetails
uiview
),
moreplandetails *moredetails = [[moreplandetails alloc] initwithframe:cgrectmake(10, 60, self.view.frame.size.width-20, self.view.frame.size.height-80)]; moredetails.plan = self.plan; [self.navigationcontroller.view addsubview:moredetails];
the property on moreplandetails defined usual way:
@property (nonatomic, strong) pfobject *plan;
and synthesized:
@synthesize plan = _plan;
this should it, doesn't it? reason moredetails.plan
stays null
. missing?
as noted in comment, use self.plan. don't need add "@synthesize" anymore, long have @property compiler generate getters , setters you.
add:
@property (nonatomic, strong) pfobject *plan;
reference in code:
self.plan = whatever
Comments
Post a Comment