【问题标题】:Setting UINavigationBar tint color in monotouch for iOS7在 iOS7 的 monotouch 中设置 UINavigationBar 色调颜色
【发布时间】:2013-11-14 06:15:57
【问题描述】:

我刚刚更新到最新的 Xamarin.iOS 4.10.0 和 xCode5,以便为 iOS7 开发我的应用程序。 现在在 iOS7 中,UINavigationBar 的 tint 颜色不是用 Tint color 设置的,而是用 BarTintColor 设置的。所以以下:

NavigationBar.TintColor = UIColor.Red; 

对 ios7 没有任何作用(在 ios6 中它确实改变了顶栏的颜色)。

如何在 iOS7 上使用 monotouch 更改 UINAvigationBar 颜色?我什至尝试通过 xCode5 进行更改,但似乎效果不佳

【问题讨论】:

  • 看起来答案在问题中:“但使用 BarTintColor”
  • 出于某种原因,当我到达我的 UINavigationController 并编写以下内容时: NavigationBar.BarTintColor 无法编译,似乎无法识别此属性。我正在使用 Xamarin.iOS 4.0.10 。有什么想法吗?

标签: xamarin.ios ios7 uinavigationbar xcode5


【解决方案1】:

来自Apple doc

iOS7:使用 tintColor 为栏按钮项目着色。 使用 barTintColor 为条形背景着色。

iOS6:使用 tintColor 为条形背景着色。

在单点触控中翻译为:TintColorBarTintColor

【讨论】:

  • 我在使用单点触控时没有 BarTinColor。我从 Xamarine 网站更新到最新版本并使用 xCode5。这是非常有线的。你用的是哪个版本?
  • BarTintColorUINavigationBar 的属性。 4.0.10 是 Xamarin.Studio 的版本。 Xamarin.iOS 的版本是多少? (Xamarin Studio > 关于 Xamarin Studio > 显示详细信息)。您需要 Xamarin.iOS >= 7.0
猜你喜欢
  • 2013-10-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多