- notification lifecycle fixes - replace some notifications with delegates
- fix osw profile switch issue
This commit is contained in:
1 parent
cd6e08956c
commit
6bc142a07b
12 files changed
+89
-96
No files matched your search
@@ -19,6 +19,12 @@ import UIKit
|
||||
}
|
||||
}
|
||||
|
||||
@objc protocol OnScreenWidgetGuidelineUpdateDelegate: AnyObject {
|
||||
func updateGuidelinesForOnScreenWidget(_ sender: Any)
|
||||
}
|
||||
@objc public weak var guidelineDelegate: OnScreenWidgetGuidelineUpdateDelegate?
|
||||
|
||||
|
||||
enum WidgetTypeEnum: UInt8 {
|
||||
case uninitialized = 0
|
||||
case button = 1
|
||||
@@ -1079,7 +1085,7 @@ import UIKit
|
||||
// center = currentLocation;
|
||||
//NSLog("x coord: %f, y coord: %f", self.frame.origin.x, self.frame.origin.y)
|
||||
if OnScreenWidgetView.editMode {
|
||||
NotificationCenter.default.post(name: Notification.Name("OnScreenWidgetMovedByTouch"), object:self) // inform the layoutOnScreenControl to update guideLines for this widget view
|
||||
guidelineDelegate?.updateGuidelinesForOnScreenWidget(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user