When i try to pop one view controller after push to that viewController not able to pop back iOS swift

Solution:

When you push the viewController using animated true then you must pop the viewController by animated true.

When push the Viewcontroller using animated false then pop the viewcontroller using false.It will works good.

Animated true

Push:
 self.navigationController?.pushViewController(vc,
 animated: true)

Pop:

self.navigationController?.popViewController(animated: true) 

Animated false

Push:
 self.navigationController?.pushViewController(vc,
 animated: false)

Pop:

self.navigationController?.popViewController(animated: false) 

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift