我搜索了这个,我找不到任何关于做这些横幅/通知/警报的文档...但我真的想实现它.如果我的文字描述不清楚,这里是我想做的图片:
1:
我尝试使用此代码:
UILocalNotification *note = [[UILocalNotification alloc] init];
[note setAlertBody:[NSString stringWithFormat:@"%@ scanned", result]];
[note setAlertAction:@"New Scanned Image"];
[[UIApplication sharedApplication] presentLocalNotificationNow:note];
Run Code Online (Sandbox Code Playgroud)
它工作正常,因此它在通知中心显示通知,但没有横幅警报.
那么我使用的课程是什么?
谢谢!