1

在 Sharekit 的 SHK 文件中,有一个调用的ShowViewController函数Mailcontroller

在新鸿基邮件

[[SHK currentHelper] showViewController:mailController];

在 SHK 文件中

// Show the nav email controller
[topViewController presentModalViewController:vc animated:YES];

vc是Mail的viewcontroller。

我检查了topviewControllervc都是有效的,但是,当单击共享工具包的电子邮件按钮时,什么都没有显示。

4

1 回答 1

2

我试过这样,它对我有用,希望它也对你有用

-(UIViewController*)getRootViewController{

    return _APPDELEGATE.navigationController;
}

[[SHK currentHelper] setRootViewController:[self getRootViewController]];

[actionSheet showFromToolbar:_APPDELEGATE.navigationController.toolbar];

我不知道为什么我上面的代码不适合你。

好的,试试这段代码,应该可以

SHKItem *item = [SHKItem URL:someNSURL title:@"a title"];

//hack: force SHK to know the root view controller
[[SHK currentHelper] setRootViewController:self];

// Share the item
[SHKMail shareItem:item];

[item release];
于 2011-08-12T07:11:18.820 回答