我正在使用MFMessageComposeViewController和MFMailComposeViewController。出於某種原因,只有郵件VC正在使用我想要的顏色進行樣式設計。下面是我在didFinish func裏AppDelegate中導航欄的樣式。如何更改MFMessageComposeViewController的導航欄顏色?
let navigationBarAppearace = UINavigationBar.appearance()
navigationBarAppearace.tintColor = Styles.whiteColor()
navigationBarAppearace.barTintColor = Styles.inputColor()
navigationBarAppearace.titleTextAttributes = [NSForegroundColorAttributeName:Styles.whiteColor()]
navigationBarAppearace.isTranslucent = false
但消息VC沒有被AppDelegate設置,但我不確定爲什麼不。 我試過但沒有改變。 令控制器= MFMessageComposeViewController()
controller.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: Styles.positiveColor()]
controller.navigationBar.barTintColor = Styles.negativeColor()
controller.messageComposeDelegate = self
是消息VC風格不同?它仍然顯示默認的白色導航欄和默認的藍色取消按鈕。
正如你可以看到消息VC不被風格化,如電子郵件VC導航欄,但我不知道爲什麼。
[如何更改mfmessagecomposeviewcontroller中的導航欄的顏色,同時在ios 9中呈現它]的可能的副本(http://stackoverflow.com/questions/33478646/how-to-change-color-of-navigation-bar- in-mfmessagecomposeviewcontroller-while-pr) – BJHStudios
似乎沒有關於我在該頁上的問題的答案。他們似乎想出如何更改郵件控制器,但不是郵件控制器。 – icekomo