我试图SLServiceTypeFacebook
在关闭视图控制器后呈现视图控制器 ()。像这样
[self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
////////////////////////////////////
//Some Stuff Other Calculations//
////////////////////////////////////
//Then
if([SLComposeViewController isAvailableForServiceType: SLServiceTypeFacebook])
{
// Facebook Service Type is Available
SLComposeViewController *slVC = [SLComposeViewController composeViewControllerForServiceType: SLServiceTypeFacebook];
SLComposeViewControllerCompletionHandler handler = ^(SLComposeViewControllerResult result)
{
if (result == SLComposeViewControllerResultCancelled)
{
NSLog(@"Cancelled");
}
else
{
NSLog(@"Done");
}
[slVC dismissViewControllerAnimated:NO completion:Nil];
};
slVC.completionHandler = handler;
[slVC setInitialText:post[@"user_fullname"]];
[slVC addURL:[NSURL URLWithString:post[@"url"]]];
[self presentViewController:slVC animated:NO completion:Nil];
}
但这似乎不起作用。Facebook 模态会自动取消。
我在概念上做错了吗?