gpt4 book ai didi

ios - 关闭 MFMailComposeViewController 后,自定义模态视图 Controller 看起来很奇怪

转载 作者:行者123 更新时间:2023-11-29 12:19:05 25 4
gpt4 key购买 nike

这是我使用过的代码,但是当我从邮件撰写 Controller 返回时,我以前的模态视图 Controller 的大小变小了。我无法找到设置 Controller 大小的位置,因此它会影响呈现 View Controller 。

- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{

switch (result)
{
case MFMailComposeResultCancelled:
NSLog(@"Mail cancelled: you cancelled the operation and no email message was queued.");
break;
case MFMailComposeResultSaved:
NSLog(@"Mail saved: you saved the email message in the drafts folder.");
break;
case MFMailComposeResultSent:
NSLog(@"Mail send: the email message is queued in the outbox. It is ready to send.");
break;
case MFMailComposeResultFailed:
NSLog(@"Mail failed: the email message was not saved or queued, possibly due to an error.");
break;
default:
NSLog(@"Mail not sent.");
break;
}

// Remove the mail view

[self dismissViewControllerAnimated:YES completion:nil];
self.view.frame = CGRectMake(0, 0, self.view.frame.size.width - 30, self.view.frame.size.height/2);

最佳答案

这只是一个愚蠢的错误。现在我想结束这个问题,这就是为什么我在这么长时间后发布答案。

self.view.frame = CGRectMake(0, 0, self.view.frame.size.width - 30, self.view.frame.size.height/2);

我只需要修复这条线,因为每次它都会减小它的宽度和尺寸。这是我在 iOS 中的开始 ;)

关于ios - 关闭 MFMailComposeViewController 后,自定义模态视图 Controller 看起来很奇怪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31178671/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com