jpsim / JPSVolumeButtonHandler

JPSVolumeButtonHandler provides an easy block interface to hardware volume buttons on iOS devices. Perfect for camera apps!
MIT License
333 stars 90 forks source link

remove observer from NSNotification center in dealloc to avoid app crash... #5

Closed markusfassbender closed 9 years ago

markusfassbender commented 9 years ago

hi i used your class just in a subview and it gets deallocated when removing the subview. when the app later goes into background it calls the selector for AVAudioSessionInterruptionNotification. this results in: -[__NSDictionaryM audioSessionInterrupted:]: unrecognized selector sent to instance 0x........ libc++abi.dylib: terminate_handler unexpectedly threw an exception

i just added one line to avoid these crashes :)

jpsim commented 9 years ago

Thanks!