

thats it, you will have an rounded textField background with any color you want.NavigationBar.textField?.layer.addSublayer(layer) NavigationBar.textField?.rnerRadius = 14 //Round it as you wish NavigationBar.textField?.layer.masksToBounds = true //to make sure you get the rounded corners Set the new layer as sublayer for textfield.


Layer.backgroundColor = (0.5).cgColor //Set your color here Make a new layer with the size of the navigationBar So I share another answer wrote in Swift 4 with simplified logic: for textField in !.subviews where textField is UITextField ) as? UITextField Disable it, and you should be good to go. Here you’ll find an option stating Automatically pick an accent color from my background. Scroll down under the same page to find Choose your Accent Color. Like all the answers before did not work as I would expect, either the answer did not work for me or it works but it needs too much "dummy" code. Open Settings Panel in Windows 10 (Win + I) Navigate to Personalization.
