I have searched for this, and I can’t find any documentation about doing these banner / notification / alerts… but I would really like to implement it.
In case my description in words is not clear, here is a picture of what I would like to do:
1: 
I tried using this code:
UILocalNotification *note = [[UILocalNotification alloc] init];
[note setAlertBody:[NSString stringWithFormat:@"%@ scanned", result]];
[note setAlertAction:@"New Scanned Image"];
[[UIApplication sharedApplication] presentLocalNotificationNow:note];
And it worked fine, such that it displayed the notification in the notifications center, but there was no banner alert.
So what are the classes that I use for this?
Thanks!
You can’t define what type of alert to be used for your app’s notifications. It can be set only by user through Notification Center settings.
Note! Alerts appear only when you app is closed or it is in background. If your app is active (it is in foreground), it will get only a notification (see
- (void)applicationDidReceiveMemoryWarning:for details).