Why is my NSNotification its observer called multiple times?

后端 未结 5 2106
一个人的身影
一个人的身影 2020-12-15 04:48

Within an App I make use of several viewcontrollers. On one viewcontroller an observer is initialized as follows:

[[NSNotificationCenter defaultCenter] remov         


        
5条回答
  •  时光取名叫无心
    2020-12-15 05:15

    In which methods did you register the observers?

    Apple recommends that observers should be registered in viewWillAppear: and unregistered in viewWillDissapear:

    Are you sure that you don't register the observer twice?

提交回复
热议问题