Skip to content

Instantly share code, notes, and snippets.

@dmytro-anokhin
Created October 8, 2017 10:50
Show Gist options
  • Save dmytro-anokhin/9fa36e8806218ef583fa93bf83afa9b2 to your computer and use it in GitHub Desktop.
Save dmytro-anokhin/9fa36e8806218ef583fa93bf83afa9b2 to your computer and use it in GitHub Desktop.
private class ContainerView: UIView {
var contentView: UIView? {
willSet {
contentView?.removeFromSuperview()
}
didSet {
guard let contentView = contentView else { return }
addSubview(contentView)
}
}
override func layoutSubviews() {
super.layoutSubviews()
contentView?.frame = bounds
}
}
private var leftContainerView: ContainerView!
private var rightContainerView: ContainerView!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment