I am looking for way for my app to receive a notification when the user takes a screenshot either with Command-Shift-3
or Command-Shift-4
.
An e
youll have to register an object to recieve the system notification when a user takes a screen shot
so:
[[NSNotificationCenter defaultCenter] addObserver: theObjectToRecieveTheNotification selector:@selector(theMethodToPerformWhenNotificationIsRecieved) name:@"theNameOftheScreenCapturedNotification" object: optionallyAnObjectOrArgumentThatIsPassedToTheMethodToBecalled];
not sure what the notification name is but it's probably out there.
don't forget to unregister yourself as well in dealloc:
[[NSNotificationCenter defaultCenter] removeObserver:self];