Any way you can tint a UIView? Not the background color, but the entire UIView with all its subviews.
e.g - A UIView with an animation of a star rotating , i.e The UIView shape is constantly changing.
Any way you can tint a UIView? Not the background color, but the entire UIView with all its subviews.
e.g - A UIView with an animation of a star rotating , i.e The UIView shape is constantly changing.
To tint a
UIView
, add another subview on top of it with the sameframe
and an alpha transparency set.For example let's say your container type view is called
containerView
, you'd do as follows:This gives you a semi transparent (0.5f) black tint that will give a tint like appearance to all the subviews underneath.
Eventually I created a UIView category that enables tinting of a UIView, without filling the UIView rectangle, here it is :