【问题标题】:Cancel MFMailComposeViewController's ActionSheet clipped取消 MFMailComposeViewController 的 ActionSheet 剪辑
【发布时间】:2012-10-05 05:12:00
【问题描述】:

我整天都在尝试解决这个问题,我将 mainWindow.xib 升级到 4 英寸 iPhone 5 版本,并且我的所有 ActionSheets 在 4 英寸模拟器上都表现正常。但是,如果我取消在 3.5 英寸设备上以纵向模式撰写电子邮件,则操作表不会完全显示(取消按钮被隐藏)。

感谢您提供的任何帮助。

这是纵向问题的截图:

由于我的 mainWindow.xib 现在是 4 英寸版本,因此我使用以下代码来显示 3.5 英寸屏幕尺寸的操作表和反作用:

sheet = [[UIActionSheet alloc] initWithTitle:nil
                                                delegate:self
                                       cancelButtonTitle:@"Cancel"
                                  destructiveButtonTitle:nil
                                       otherButtonTitles:@"Share via iMessage/SMS", @"Share via E-Mail", @"Review App", nil];

            // This code is for the iPhone 5 portrait & landscape, 3.5" landscape, and iPad

            if ([[UIScreen mainScreen] applicationFrame].size.height == 548 | orientation == UIInterfaceOrientationLandscapeLeft | orientation == UIInterfaceOrientationLandscapeRight | UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
            {
                [sheet showInView:self.parentViewController.view];
            }

            // This code is for 3.5" portrait

            else
            {
                [sheet showInView:self.parentViewController.view];
                [sheet setFrame:CGRectMake(0, 220, 320, 320)];
            }

【问题讨论】:

    标签: iphone objective-c ios uiactionsheet mfmailcomposeviewcontroller


    【解决方案1】:

    找到解决方案;我不得不将我的 mainWindow.xib 大小更改为 None,并在我的应用程序委托中添加以下行:

    self.window.frame = CGRectMake(0, 0, [[UIScreen mainScreen]bounds].size.width, [[UIScreen     mainScreen]bounds].size.height);
    

    【讨论】:

      猜你喜欢
      • 2014-12-13
      • 2017-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-11
      • 2019-03-16
      相关资源
      最近更新 更多