【问题标题】:xcode - Design / Redesign MailController / MFMailComposeViewControllerxcode - 设计 / 重新设计 MailController / MFMailComposeViewController
【发布时间】:2013-01-13 17:20:37
【问题描述】:

是否可以重新设计 MFMailComposeViewController?

怎么做?

应用 Dropbox 可以做到。 图片:http://jonathangurebo.tumblr.com/post/40436277822

我可以更改“MessageUI.framework”吗?

【问题讨论】:

  • 有什么不同?这与我在每个应用程序(包括我自己的应用程序)中看到的 MFMailComposeViewController 相同。
  • 您可能瞄准了错误的目标。他们很可能在不改变框架本身的情况下定制了视图的外观。尝试来自 WWDC 2012 的会话 216(iOS 上的高级外观定制),它展示了如何做到这一点:developer.apple.com/videos/wwdc/2012/?id=216
  • 对不起,我的意思是邮件控制器上的导航栏。在视频中,我可以看到他们可以使用以下代码更改普通导航栏:[bar setBackgroundImage:img]; (类似的东西)但是如何更改 MailController 上的导航栏?
  • 您不是在谈论重新设计MFMailComposeViewController,您只是在谈论使用UIAppearance 方法来设置应用级别的配色方案。就是这样。
  • 好的,但是如何更改所有导航栏(包括邮件栏)?如何让我当前的导航栏在邮件控制器中查看?

标签: ios objective-c xcode mfmailcomposeviewcontroller


【解决方案1】:

要回答您关于自定义应用程序中所有导航栏外观的请求,请在您的应用程序中使用它:didFinishLaunchingWithOptions: 在您的应用程序委托中:

[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"image"] forBarMetrics:UIBarMetricsDefault];

        [[UINavigationBar appearance] setTintColor:[UIColor blueColor]];
        [[UINavigationBar appearance] setAlpha:1]; 
//change background image and tint color for navigation buttons

        // Set the text appearance for navbar
        [[UINavigationBar appearance] setTitleVerticalPositionAdjustment:2 forBarMetrics:UIBarMetricsDefault]; //change vertical appearance of navigation bar title
        [[UINavigationBar appearance] setTitleTextAttributes:
         [NSDictionary dictionaryWithObjectsAndKeys:
          [UIColor whiteColor], UITextAttributeTextColor,
          [UIColor clearColor], UITextAttributeTextShadowColor,
          [NSValue valueWithUIOffset:UIOffsetMake(1, 1)], UITextAttributeTextShadowOffset,
          [UIFont fontWithName:@"HelveticaNeue" size:22], UITextAttributeFont,
          nil]]; //set custom font info

【讨论】:

    猜你喜欢
    • 2017-08-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多