I have a small view with a few buttons on it. I want to make this small views background a black gradient identical to the gradient when you set your UINavigation bar to Black Opaque?
Is this possible programmatically or do I need to try my best at Photoshop to copy it? 🙂
Simple override drawRect message for UIView and draw background:
For creating and caching gradient use this snippet (color components you should use your own).
And of course don’t forget release your gradient into dealloc.