ios - Not able to load my view controller after completed ~10 min in background -
i putting app in background ~10 min (using beginbackgroundtaskwithexpirationhandler
) after home button pressed. @ end of 10 min setting local notification launch app again same view controller.
but when interact local notification not able come on same view controller. it's called applicationwillenterforeground
, didreceivelocalnotification
. in didreceivelocalnotification
setting view controller no success.
edit
code in didreceivelocalnotification
nf1abccontroller *abc = [[nf1abccontroller alloc]init]; [self.navigationmanager.defaultnavigationcontroller pushviewcontroller:abc animated:yes];
you have make sure abc view controller not nill, check defaultnavigationcontroller not nil.
the appropriate way such thing send notification of type nsnotifcation inside applicationdidrevievelocalnotification method
also have register last view controller visible before app entered background ,when view controller receives notification pushes desired view controller
more on in apple notification programming guide
Comments
Post a Comment