TitlebarView: move to drag api
This commit is contained in:
@@ -61,11 +61,7 @@ class TitlebarView: UIView
|
||||
|
||||
private let separatorView = UIView(frame: .zero)
|
||||
private let securityIndicatorView = SecurityIndicatorView()
|
||||
|
||||
override var _sceneDraggingBehaviorOnPan: _UIViewSceneDraggingBehaviorOnPan {
|
||||
_UIViewSceneDraggingBehaviorOnPan.dragScene
|
||||
}
|
||||
|
||||
|
||||
convenience init() {
|
||||
self.init(frame: .zero)
|
||||
addSubview(backgroundView)
|
||||
@@ -88,6 +84,11 @@ class TitlebarView: UIView
|
||||
securityIndicatorView.label.font = UIFont.systemFont(ofSize: 10.0)
|
||||
|
||||
backgroundView.alpha = 0.98
|
||||
|
||||
// Make draggable
|
||||
if #available(iOS 17.0, *) {
|
||||
addInteraction(UIWindowSceneDragInteraction())
|
||||
}
|
||||
}
|
||||
|
||||
func setTitle(_ title: String) {
|
||||
|
||||
Reference in New Issue
Block a user