ios - Override UIViewController's view property -
i want override myviewcontroller : uiviewcontroller
's setview:
method, such that, not allow 1 set view
's property nil
.
-(void)setview:(uiview*)view { if (view == nil) //ignore - make no change else //default performance }
how can this?
calling super class when want default behavior should work:
-(void)setview:(uiview*)view { if (view == nil) { //ignore - make no change } else { //default performance [super setview:view]; } }