I'm using a UISearchController with the presenting VC as the results 
controller. I want to display the search bar (field and cancel button) over my 
UINavigationBar. I want the background color of the search bar to be the same 
as my navigation bar (0, 47, 64, 1.0). But when I try to set its barTintColor, 
I get (0, 248, 248), a gaudy bright blue. I'm creating it with this:

        self.searchController = UISearchController(searchResultsController: nil)
        self.searchController!.searchResultsUpdater = self
        self.searchController!.searchBar.delegate = self
        self.searchController!.hidesNavigationBarDuringPresentation = false
        self.searchController!.dimsBackgroundDuringPresentation = false
        self.searchController!.searchBar.barTintColor = 
UIColor(colorLiteralRed: 0, green: 47, blue: 64, alpha: 1.0)

I've tried a number of variations, short of generating a UIImage filled with 
that color to set as the background image.

Any ideas? Thanks.


-- 
Rick Mann
[email protected]



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to