I am using the new UIAlertController to implement an options menu for my application. I am trying to get the background color of the UIAlertController to fit the theme of the rest of my application. The theme for my application is quite simple and consists of white text with a blue / gray background for the toolbar and navigation bar shown below:

However, I am having some problems making my UIAlertController fit this topic. I made the following two calls to set the color of text and background:
uiAlertController.view.backgroundColor = UIColor(red: CGFloat(.17255), green: CGFloat(.24314), blue: CGFloat(.31373), alpha: CGFloat(1.0)) uiAlertController.view.tintColor = UIColor.whiteColor()
This changed the UIAlertController as shown below:

The text has been changed to the default blue system color to white, but the background color is incorrect. I also tried changing the given opacity ( uiAlertController.view.opaque = true ), but that didn't help either. How do I adjust the background color to match my navigation bar and toolbar? Thanks
source share