我提出了一个像这样的UIActivityViewController:
CustomActivityItem* activityItem = [[CustomActivityItem alloc] initWithBody:self.feedItem.link andWithSubject:self.feedItem.title];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[activityItem] applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:^{
}];
现在,如果我按分享按钮并选择“邮件”,则主题不仅会显示在主题字段中。它也显示在我的标题中。我可以避免这种行为吗?!
答案 0 :(得分:0)
我自己解决了:
[activityViewController setCompletionHandler:^(NSString *activityType, BOOL completed) {
// back to normal color
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"Header.png"] forBarMetrics:UIBarMetricsDefault];
}];
[self presentViewController:activityViewController animated:YES completion:^{
[[UINavigationBar appearance] setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
}];