Hello
first of all thanks for the code! keep it up.
in my viewcontroller i have a couple of nsnotifications already running in my viewWillAppear.
if from that viewcontroller i use your code to present a modal then when dismissing it
a line in your category:
[[NSNotificationCenter defaultCenter] removeObserver:self];
will remove ALL observers from a view, even the ones i was having in my original view.
a solution is this:
replace this:
[[NSNotificationCenter defaultCenter] removeObserver:self];
with this
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
Hello first of all thanks for the code! keep it up.
in my viewcontroller i have a couple of nsnotifications already running in my viewWillAppear.
if from that viewcontroller i use your code to present a modal then when dismissing it a line in your category: [[NSNotificationCenter defaultCenter] removeObserver:self]; will remove ALL observers from a view, even the ones i was having in my original view.
a solution is this: replace this: [[NSNotificationCenter defaultCenter] removeObserver:self]; with this [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
thanks K.K