ios - Pop to previous UINavigationController -
i have 2 uinavigationcontrollers this:
loginnavigationcontroller -> loginview homenavigationcontroller -> homeview -> ...
from loginview navigate homeview this:
[self presentviewcontroller:homenavigationcontroller animated:yes completion:nil];
now when app goes background need go loginview. right way this? redirecting presentviewcontroller cause memory issues?
please use below code in loginview -
- (void)viewdidload { [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(methodenterbgmode) name:uiapplicationdidenterbackgroundnotification object:nil]; } - (void)methodenterbgmode { [self dismissviewcontrolleranimated:no completion:nil]; }
hope you.
Comments
Post a Comment