Both add a view to the receiver as a sub-view, which forces the view to be displayed if the receiver is displayed and positioned relative to the receiver.
But,
addSubview: Adds your view to the end of the list, which puts it on top of other subzones when drawing.insertSubview:atIndex: adds your presentation to a specific position in the list, which places it above the supervision that appears in front of it in the list, and under the subzone that appears later.
[parentView addSubview:childView] same as [parentView insertSubview:childView atIndex:[[parentView subviews] count]] .
All you need to know is here .
source share