【问题标题】:Custom MailComposeViewController Navigationbar not working in iOS 5自定义邮件撰写 ViewController 导航栏在 iOS 5 中不起作用
【发布时间】:2012-03-09 18:04:46
【问题描述】:

开发 MFMailComposeViewController 以在 ios 5 模拟器上的导航栏上具有自定义 titleView,但它不能在它上面工作。 目前它有 Xcode 4.2,当部署在 iOS 4 上时,它可以正常工作,但不能在 iOS 5 上运行。 由于该方法仍未弃用,如何解决该问题?

MFMailComposeViewController* mailComposeViewController = [[MFMailComposeViewController alloc] init];
        mailComposeViewController.mailComposeDelegate = self;
        mailComposeViewController.navigationBar.tintColor = [UIColor colorNavTint];
        mailComposeViewController.navigationBar.topItem.titleView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo.png"]] autorelease];

【问题讨论】:

    标签: iphone objective-c uinavigationcontroller mfmailcomposeviewcontroller


    【解决方案1】:

    试试:

    mailComposeViewController.navigationController.navigationBar.tintColor = [UIColor colorNavTint];
    mailComposeViewController.navigationController.navigationBar.topItem.titleView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo.png"]] autorelease];
    

    编辑: 试试这个: mailComposeViewController.navigationController.navigationItem.titleView=[[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo.png"]] autorelease];

    【讨论】:

      猜你喜欢
      • 2011-12-09
      • 1970-01-01
      • 2012-01-05
      • 1970-01-01
      • 1970-01-01
      • 2013-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多