mirror of
https://github.com/exyte/Macaw.git
synced 2024-08-15 08:00:31 +03:00
Fix for animation hierarchy movement
This commit is contained in:
parent
5c0f812f0c
commit
67b7bb132f
@ -103,23 +103,22 @@ open class MacawView: MView, MGestureRecognizerDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
open override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
drawingView.frame = self.bounds
|
||||
}
|
||||
|
||||
func initializeView() {
|
||||
|
||||
if !self.subviews.contains(drawingView) {
|
||||
if self.backgroundColor == nil {
|
||||
self.backgroundColor = .white
|
||||
}
|
||||
drawingView.removeFromSuperview()
|
||||
self.addSubview(drawingView)
|
||||
drawingView.backgroundColor = .clear
|
||||
drawingView.initializeView()
|
||||
|
||||
drawingView.translatesAutoresizingMaskIntoConstraints = false
|
||||
drawingView.trailingAnchor.constraint(equalTo: self.trailingAnchor).isActive = true
|
||||
drawingView.leadingAnchor.constraint(equalTo: self.leadingAnchor).isActive = true
|
||||
drawingView.bottomAnchor.constraint(equalTo: self.bottomAnchor).isActive = true
|
||||
drawingView.topAnchor.constraint(equalTo: self.topAnchor).isActive = true
|
||||
|
||||
#if os(iOS)
|
||||
self.clipsToBounds = true
|
||||
drawingView.isUserInteractionEnabled = false
|
||||
|
Loading…
Reference in New Issue
Block a user