Modern technique of adding gradient to UIView
问题 I know of several ways of adding background gradients to UIView. I was wondering what is the most efficient and scalable way of doing so, and why? Here are the techniques I've used: Create subview of UIView and overwrite the drawRect, where I draw the gradient in current context. a. When using the above gradient create it with the bounds of view I want to decorate and insert this background gradient as first subview, i.e. – insertSubview:atIndex: b. After I get the background gradient view