0

When we Swipe right to Pop view controller/Click Back Button on navigation bar only ViewWillAppear code is called ,but , when we programmatically call [self.navigationcontroller popViewControllerAnimated:YES]; , It behaves differently , first ViewDidLoad is called and then ViewWillAppear is called . How can I achieve behaviour in 1st case using code ?

  • ViewDidLoad will *always* be called before ViewWillAppear gets called for the first time. – Aurast Jul 22 '15 at 14:36
  • @rschmidt my view is already loaded in memory . Stil when I Pop VC view didload gets called again , whereas on view will appear should be called. – user1147651 Jul 23 '15 at 08:21
  • Found the answer ... The view controller was being re instantiated from within the code ! That is why viewdidload was being called. ! Solved the problem . – user1147651 Jul 23 '15 at 12:46

0 Answers0