[英]MFMessageComposeViewController showed without cancel button and title
我的應用程序具有允許用戶向尚未注冊我們應用程序以邀請他們的聯系人發送短信的功能。 幾周前,我實現了以下步驟,並且效果很好:
if ([MFMessageComposeViewController canSendText]) {
MFMessageComposeViewController *controller = [MFMessageComposeViewController new];
NSDictionary *contact = self.notRegisterdUser[index]; // got from reading user's contacts if allowed
controller.recipients = @[contact.allKeys[0]];
controller.body = @"some message";
controller.messageComposeDelegate = self;
[self presentViewController:controller animated:YES completion:nil];
}
但是昨天我發現該功能已損壞,因為它沒有顯示“取消”按鈕,如下所示:
我已經在iOS 8.1、8.2、8.3和8.4上對其進行了測試,它適用於所有人。 有什么變化或我做錯了嗎?
您是否使用FDFullscreenPopGesture從forkingdog? 如果是這樣,那就是問題所在。 FDFullscreenPopGesture類別與彈出的sms視圖有某種沖突。 談論這個有一個問題 。
問題中提供了解決方案,我已經檢查了:
使用MFMessageComposeViewController時,應禁用它。 請注意,將fd_viewControllerBasedNavigationBarAppearanceEnabled設置為NO無效。 臨時解決方案可能是:
(void)fd_pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
//Add this:
if ([self isKindOfClass:[MFMessageComposeViewController class]]) {
[self fd_pushViewController:viewController animated:animated];
return;
}
......
}
這可能是一個較晚的答案,但希望它對其他人有用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.