Author Topic: How to programmatically move a control or subview to the front of the view  (Read 14365 times)

kjmcneish

  • Administrator
  • *****
  • Posts: 719
    • View Profile
You can call a view's bringSubviewToFront: method to bring a control or subview to the front. For example:

Swift:
Code: [Select]
self.view.bringSubviewToFront(self.activityIndicator)
Objective-C:
Code: [Select]
[self.view bringSubviewToFront:self.activityIndicator];
All the best!
Kevin McNeish
Author of "Learn to Code in Swift": https://itunes.apple.com/us/book/learn-to-code-in-swift/id942956811?mt=11
« Last Edit: August 11, 2015, 03:48:57 PM by kjmcneish »