I have a table, created through the storyboard, whose edges that are being clipped by some programmatically created images and labels. How would I make the tables Z axis be on the top of the other UI items? Setting the Editor->Arrange->Send to front does not work because the other items are created programmatically and happen ‘after’.
I have a table, created through the storyboard, whose edges that are being clipped
Share
A UIView’s subviews array property defines the Z-index ordering of it’s subviews. The bottom view is at array index 0, the top view is [subviews lastObject]. As you create new objects they are automatically placed at the end of this array (so on top).
Therefore you want to ensure that the table is later in the array than your programatically created objects. An easy way to organise this is to create a subview as your container-for-images-and-labels in the storyboard as a sibling of the tableview, and ensure that the tableview is in front.