0

I have made a gradient and I am drawing an image programmatically in a view controller, but I also added a button from the object library, but it is hidden behind the gradient and image. I was wondering how I could layer these so that the button is on top of the code-created objects.

Tanner Helton
  • 89
  • 1
  • 1
  • 12

1 Answers1

1

Check out this question that explains the UIView methods available to position views within your VC. This could be done programmatically, whereas the other answer here (deleted, but showed editing the storyboard file) is done for predefined objects.

Community
  • 1
  • 1
Daniel Legler
  • 527
  • 1
  • 6
  • 16
  • That works for the subview, do you know about sending layers back? I have a gradient layer for my background and I can't manipulate it's z position because it is a layer not a view. – Tanner Helton Feb 18 '17 at 22:43