【发布时间】:2014-02-28 00:42:05
【问题描述】:
在我的 UIActivityViewController 中,我使用完成处理程序来执行“成功共享”通知。它可以工作,但我唯一的问题是,如果用户按下取消,它仍然会显示通知。
这是我的完成处理程序代码,
[controller setCompletionHandler:^(NSString *activityType, BOOL completed) {
CWStatusBarNotification *notification = [CWStatusBarNotification new];
[notification displayNotificationWithMessage:@"✓ Successfully Shared Centre!"
forDuration:3.0f];
notification.notificationLabelBackgroundColor = [UIColor colorWithRed:38.0f/255.0f green:81.0f/255.0f blue:123.0f/255.0f alpha:1.0f];
notification.notificationLabelTextColor = [UIColor whiteColor];
}];
感谢您的帮助!
【问题讨论】:
-
建议:不要显示“共享成功”通知。这可能很烦人。
-
我的设计师想要它,我不同意,但他是负责人:/
标签: ios uiactivityviewcontroller completionhandler