Missing shadow (hairline) on iOS7 UIToolbar

This is because, by default, toolbars are attached to bottom, so the shadow line appears at the top (if they are at the bottom). You need to set the delegate of the toolbar and implement the following UIBarPositioningDelegate method like so:

- (UIBarPosition)positionForBar:(id<UIBarPositioning>)bar
{
    return UIBarPositionTop; //or UIBarPositionTopAttached
}

I just ran into a case where a view was positioned between a top and bottom toolbar and configured to auto-resize to fill the space. However, it was layered above the bottom toolbar and the auto-resize made it cover the bottom toolbar's top shadow. The solution was to adjust the layering in Interface Builder so the toolbars were layered above the other views.