mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
29 lines
673 B
Swift
29 lines
673 B
Swift
import Foundation
|
|
import UIKit
|
|
import AsyncDisplayKit
|
|
|
|
open class UITracingLayerView: UIView {
|
|
private var scheduledWithLayout: (() -> Void)?
|
|
|
|
open func schedule(layout f: @escaping () -> Void) {
|
|
self.scheduledWithLayout = f
|
|
self.setNeedsLayout()
|
|
}
|
|
|
|
override open var autoresizingMask: UIView.AutoresizingMask {
|
|
get {
|
|
return []
|
|
} set(value) {
|
|
}
|
|
}
|
|
|
|
override open func layoutSubviews() {
|
|
super.layoutSubviews()
|
|
|
|
if let scheduledWithLayout = self.scheduledWithLayout {
|
|
self.scheduledWithLayout = nil
|
|
scheduledWithLayout()
|
|
}
|
|
}
|
|
}
|