无论如何设置从UIActivityViewController
通过此代码调用共享屏幕
-(void)shareLink:(id)sender{
Post *post = [self.linkViewItems objectAtIndex:self.swipedPath.row];
NSMutableString *txt = [[NSMutableString alloc] init];
[txt appendString:[post description]];
[txt appendString:@" "];
[txt appendString:[post href]];
NSString* someText = txt;
NSArray* dataToShare = @[someText]; // ...or whatever pieces of data you want to share.
UIActivityViewController* activityViewController =
[[UIActivityViewController alloc] initWithActivityItems:dataToShare
applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:^{}];
}
答案 0 :(得分:-1)
试试这个
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[[picker navigationBar] setTintColor:[UIColor clearColor]];//You can set your colour
UIImage *image1 = [UIImage imageNamed: @"bg_header.png"];
UIImageView * iv = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,42)];
iv.image = image1;
iv.contentMode = UIViewContentModeCenter;
[[[picker viewControllers] lastObject] navigationItem].titleView = iv;
[[picker navigationBar] sendSubviewToBack:iv];
[iv release];
[self presentViewController:picker animated:NO completion:nil];
[picker release];
看看这是内置的框架工作。