WatchKit Notification Sash Color

不问归期 提交于 2019-12-05 06:57:56

The sash color is set for the WKNotificationCategory in the storyboard, which has a name. (In your screenshot "myCategory"). Then, for the correct sash color to appear on the real device, the push notification needs to have the matching category name when you send it.

UILocalNotification *notification = [[UILocalNotification alloc] init];
if (notification) {
    notification.alertBody = @"Hello";
    notification.category = @"myCategory";
    [[UIApplication sharedApplication] scheduleLocalNotification:notification];
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!