Search code examples
iosswiftuinavigationitem

iOS 11 System gray color


I have a UIView directly below my default Navigation Bar and I am trying to make it appear that the region is one. To do this I am trying to match the color of my custom view to the color of the navigation bar. However, it doesn't seem to be any of the UIColors such as gray or lightGray. I would assume that if it is a custom color then I would be able to pull the color from the navigation bar, but I cannot seem to find the value.


Solution

  • you can use digital color picker app available in mac os,

    enter image description here

    Then whichever component's color you want just hover mouse pointer there and you will get the RGB Values in digital color meter and that RGB values you can use in setting the background of your view,

    in this way,

    UIColor.init(red: 49.0/255.0, green: 49.0/255.0, blue: 49.0/255.0, alpha: 1.0)
    

    enter image description here