To stay safe: Register your NSNotification
in -init
or (with IB) -initWithNibName:
A controller of a UITabbarController
is initialized with init
when you set the controllers
property of the UITabbarController
.
viewWillAppear
and viewDidAppear
are called each time you make one of the controllers visible by tapping on a tabbar icon.
Solution:
- register your
NSNotification
by overriding-init
in each of your 'sub'-controllers - unregister the notification in
-dealloc
(don't call[super dealloc]
with ARC!!!)
Now everything works fine!