在我的应用中,我正在使用UILocalNotification。我想在此处显示带有图标的通知:
以下是我的代码,负责创建本地通知:
UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.timeZone = [NSTimeZone defaultTimeZone];
notification.fireDate = date;
notification.alertBody = body;
notification.alertTitle = title;
notification.userInfo = userInfo;
notification.category = category;
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
我在“UILocalNotification”对象中找到了“alertLaunchImage”字段,但它似乎无法正常工作。你能告诉我如何在本地通知中添加自定义图标吗?