Swiftgram/TelegramUI/AuthorizationPhoneControllerNode.swift
2016-08-23 16:21:34 +03:00

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))
}
}