ios - EXC_BAD_ACCESS when swizzle popViewControllerAnimated: -


for logging navigation between controllers, use swizzling of -popviewcontrollersanimated: method. , causes strange crash exc_bad_access. can reason?

- (void)sw_popviewcontrolleranimated:(bool)animated {  //1. top controller before pop //2. pop //3. top controller after pop //4. log nsstring *controllerfromidentifier = @""; __block nsstring *controllertoidentifier = @"";      nsdictionary *controllerfromadditionalparams = @{};      uiviewcontroller *topcontroller = ((uinavigationcontroller*)self).topviewcontroller;      [self sw_popviewcontrolleranimated:animated];      uiviewcontroller *topcontrollerafterpop = ((uinavigationcontroller*)self).topviewcontroller;  } 


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -