ios - Completely kill ViewController programmatically In Swift -


when send notification notificationcenter, opened viewcontroller (with diffrent data) responding notification. example

a b x data b y data b z data

after scenario (in b viewcontroller), when pushed notification, notification observer calling 3 times.

i use storyboard , programmatically navigation controller.

you need remove notification observer in bviewcontroller add bellow method in bviewcontroller

deinit {     nsnotificationcenter.defaultcenter().removeobserver(self) } 

Comments

Popular posts from this blog

python - PyInstaller UAC not working in onefile mode -

python - RuntimeError: can't re-enter readline -

php - Need to store a large amount of data in session with CI 3 but on storing large data in session it is itself destorying automatically -