小编Luk*_*etr的帖子

在呈现和解除视图控制器后,iOS 7.1上缺少标签栏背景

我在iOS 7.1上试过我的应用程序,我发现标签栏背景有几次消失了.我能够追踪它们; 它发生在:

  • 推动放置在导航控制器内部的视图控制器(位于标签栏控制器内) hidesBottomBarWhenPushed = YES
  • 呈现一个视图控制器然后解雇它(即MFMailComposeViewController)

我已经创建了一个示例应用程序(使用选项卡栏模板+添加按钮来显示视图控制器,并使用mapView来判断栏是否消失),问题就在那里.

在此输入图像描述

以下是我更改的示例应用程序的所有代码:

#import "FirstViewController.h"

@import MessageUI;

@interface FirstViewController () <MFMailComposeViewControllerDelegate>

@end

@implementation FirstViewController

- (IBAction)presentVCButtonPressed:(id)sender {
    if ([MFMailComposeViewController canSendMail]) {

        MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
        mailer.mailComposeDelegate = self;
        [mailer setSubject:@"Feedback for Routie"];
        [mailer setToRecipients:@[@"support@routieapp.com"]];
        [self presentViewController:mailer animated:YES completion:nil];
    }
}

- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
    [self dismissViewControllerAnimated:YES completion:nil];
}

@end
Run Code Online (Sandbox Code Playgroud)

在这里,您可以下载整个示例项目.

现在,重要的是:这似乎不会影响iPhone 5,也不会影响模拟器.问题出在iPhone 4和iPod Touch上(写这篇文章的最后一代).

你们有没有同样的问题?你能解决它吗?谢谢!

更新:我找到了解决方法.请参阅下面的答案.

uitabbar ios ios7.1

20
推荐指数
1
解决办法
4534
查看次数

标签 统计

ios ×1

ios7.1 ×1

uitabbar ×1