I need to replicate the function of bringSubviewToFront: on the iPhone, but I am programming on the Mac. How can this be done?
This is Swift 3.0 solution:
extension NSView { public func bringToFront() { let superlayer = self.layer?.superlayer self.layer?.removeFromSuperlayer() superlayer?.addSublayer(self.layer!) } }