mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			41 lines
		
	
	
		
			828 B
		
	
	
	
		
			Swift
		
	
			
		
		
	
	
			41 lines
		
	
	
		
			828 B
		
	
	
	
		
			Swift
		
	
//
 | 
						|
//  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
 | 
						|
//
 | 
						|
 | 
						|
import Foundation
 | 
						|
 | 
						|
@objc
 | 
						|
public class OWSLayerView: UIView {
 | 
						|
    let layoutCallback: ((UIView) -> Void)
 | 
						|
 | 
						|
    @objc
 | 
						|
    public required init(frame: CGRect, layoutCallback : @escaping (UIView) -> Void) {
 | 
						|
        self.layoutCallback = layoutCallback
 | 
						|
        super.init(frame: frame)
 | 
						|
    }
 | 
						|
 | 
						|
    public required init?(coder aDecoder: NSCoder) {
 | 
						|
        self.layoutCallback = { _ in
 | 
						|
        }
 | 
						|
        super.init(coder: aDecoder)
 | 
						|
    }
 | 
						|
 | 
						|
    public override var bounds: CGRect {
 | 
						|
        didSet {
 | 
						|
            layoutCallback(self)
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    public override var frame: CGRect {
 | 
						|
        didSet {
 | 
						|
            layoutCallback(self)
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    public override var center: CGPoint {
 | 
						|
        didSet {
 | 
						|
            layoutCallback(self)
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |