mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-29 00:50:40 +00:00
22 lines
756 B
Swift
22 lines
756 B
Swift
import Foundation
|
|
import Display
|
|
import AsyncDisplayKit
|
|
|
|
class AuthorizationPhoneControllerNode: ASDisplayNode {
|
|
let phoneNode: ASEditableTextNode
|
|
|
|
override init() {
|
|
self.phoneNode = ASEditableTextNode()
|
|
|
|
super.init()
|
|
|
|
self.phoneNode.typingAttributes = [NSFontAttributeName: Font.regular(17.0)]
|
|
self.phoneNode.backgroundColor = UIColor.lightGray
|
|
self.addSubnode(self.phoneNode)
|
|
}
|
|
|
|
func containerLayoutUpdated(_ layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
|
self.phoneNode.frame = CGRect(origin: CGPoint(x: 4.0, y: navigationBarHeight + 4.0), size: CGSize(width: layout.size.width - 8.0, height: 32.0))
|
|
}
|
|
}
|