ios - Switching UIViews without changing the top bar -
i'm new ios programming , can't figure out. have view-based application navigation bar , "custom" bar under navigation bar (an image 2 uibuttons on it). under 2 bars have 2 uiviews must shown @ press of corresponding button on "custom" bar, top bars must remain same whole time.
do have ideas how this?
you can add both views viewcontrollers subview , use hidden property of views show/hide correct view.
-(void) viewdidload { [super viewdidload]; [self.view addsubview:view1]; [self.view addsubview:view2]; view1.hidden=yes; view2.hidden=yes; } -(ibaction) btn1pressed { view1.hidden=no; view2.hidden=yes; } -(ibaction) btn2pressed { view1.hidden=yes; view2.hidden=no; }
Comments
Post a Comment