I want to access a inner object from a notification. I need to get the key AVSystemController_AudioVolumeChangeReasonNotificationParameter.
If I call [sender object] I get this output. But if I call
[[sender object] userInfo]
I only get "unrecognized selector sent to instance". Why is that?
NSLog(@"%@", [sender object]) output:
NSConcreteNotification 0x157a30 {name = AVSystemController_SystemVolumeDidChangeNotification; object = AVSystemController: 0x1616c0; userInfo = { "AVSystemController_AudioCategoryNotificationParameter" = "Audio/Video"; "AVSystemController_AudioVolumeChangeReasonNotificationParameter" = ExplicitVolumeChange; "AVSystemController_AudioVolumeNotificationParameter" = 1; }}
If it is not possible to access userInfo, can I get the output of NSLog to do a string search?