I currently have a base view controller say AVC which present another view controller say BVC over current context like this:
let bvc: BVC = sb.instantiateVi
As u noticed that when presenting OverCurrentContext
, viewWillAppear
will not be called on dismiss.
viewWillAppear
will be called whenever u back to your view (in case that the view is already disappeared). When u present a new view using OverCurrentContext
, the main view is still appeared and u present a new one over it or over part of it ! Popup effect !
Because of this logic, viewWillAppear
will not be called when u dismiss the OverCurrentContext
view and u have to handle it manually using any way like @Sandeep did above.