ios - push UIViewcontroller to UINavigation Controlller -
i have login screen , forgot password screen.forgot password screen connect navigation controller login screen not connect navigation controller how move login screen forgot screen
forgotpasswod *secondviewcontroller = [self.storyboard instantiateviewcontrollerwithidentifier:@"forgotpasswodpage"]; [self.navigationcontroller pushviewcontroller:secondviewcontroller animated:yes];
if want move viewcontroller navigation viewcontroller use presentview controller. paste code in action method - (ibaction)forgotpassword:(id)sender { forgotpasswod *secondviewcontroller = [self.storyboard instantiateviewcontrollerwithidentifier:@"forgotpasswodpage"]; uinavigationcontroller *controller = [[uinavigationcontroller alloc] initwithrootviewcontroller:secondviewcontroller]; [self presentviewcontroller:controller animated:yes completion:nil]; }
when try code can change navigation bar color
if (floor(nsfoundationversionnumber) <= nsfoundationversionnumber_ios_6_1) { // ios 6.1 or earlier self.navigationcontroller.navigationbar.tintcolor = [uicolor colorwithhexstring:@"#37b578"]; } else { // ios 7.0 or later self.navigationcontroller.navigationbar.bartintcolor = [uicolor colorwithhexstring:@"#37b578"]; self.navigationcontroller.navigationbar.translucent = no; }
ok try code , tell me happen...
Comments
Post a Comment