从主 Storyboard 转到 iMessage Storyboard,iOS,Xcode

got to iMessage storyboard from main Stoyboard, iOS, Xcode

我正在尝试连接我的主应用程序,以便在我按下按钮时它会转到 iMessage 扩展程序。我已经设置了情节提要参考并将其选择到 iMessage 情节提要中。但是在运行时我收到一条错误消息

: error: Did not find storyboard named "MainInterface" referenced from ShowAndComments.storyboard Command LinkStoryboards failed with a nonzero exit code.

删除该 segue 并在您的按钮操作上以编程方式实例化 MFMessageComposeViewController 并显示它。

OBJ-C example

创建您的 MFMessageComposeViewController

NSArray *recipents = @[@"12345678", @"72345524"];
MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init];
messageController.messageComposeDelegate = self;
[messageController setRecipients:recipents];
[messageController setBody:message];

显示出来(vc应该是UIViewController的实例或者它的子类)

[vc presentViewController:messageController animated:YES completion:nil];