cezarywojcik / CWPopup

CWPopup category to present popup view controllers
MIT License
289 stars 62 forks source link

notification issue #2

Closed mythodeia closed 10 years ago

mythodeia commented 10 years ago

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

cezarywojcik commented 10 years ago

I'll try to get around to updating that soon, thanks!

mythodeia commented 10 years ago

no problem. thanks K.K

cezarywojcik commented 10 years ago

https://github.com/cezarywojcik/CWPopup/commit/5c3ba9554f72ceb07b25e4e76c209220c38fe261