I am writing an app on iOS platform, I want a shadow effect behind my toolbar like this,

- Currently I am using UIImageView for a start up, However I would like to know which one would be better choice? Using UIImageView or drawing a rectangle with gradient in it?
Thanks for any inout!
Is there going to be animated content overlapping your shadow? Because unless there is, I doubt it makes enough of a difference to matter. In which case, go with UIImageView, because it’s easiest.
If there is going to be animated content, I would suspect you’ll be able to wring slightly better performance out of drawing it yourself, but you’re going to have to do some Core Graphics optimization (cache the drawn gradient, cache the CGGradient for redraws, etc.).
Beware premature optimization. BEWARE!