-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
When multiple layoutSubview-based methods are swapped in an App, UIView's swizzled_layoutSubviews may not be executed
static let swizzle_layoutSubviews: Void = {
guard let originalMethod = class_getInstanceMethod(UIView.self, #selector(layoutSubviews)),
let swizzledMethod = class_getInstanceMethod(UIView.self, #selector(swizzled_layoutSubviews))
else { return }
method_exchangeImplementations(originalMethod, swizzledMethod)
}()
@objc func swizzled_layoutSubviews() {
swizzled_layoutSubviews()
_componentEngine?.layoutSubview()
}
Metadata
Metadata
Assignees
Labels
No labels