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

22 lines
773 B
Swift

import Foundation
import Display
import AsyncDisplayKit
class AuthorizationPasswordControllerNode: ASDisplayNode {
let passwordNode: ASEditableTextNode
override init() {
self.passwordNode = ASEditableTextNode()
super.init()
self.passwordNode.typingAttributes = [NSFontAttributeName: Font.regular(17.0)]
self.passwordNode.backgroundColor = UIColor.lightGray
self.addSubnode(self.passwordNode)
}
func containerLayoutUpdated(_ layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
self.passwordNode.frame = CGRect(origin: CGPoint(x: 4.0, y: navigationBarHeight + 4.0), size: CGSize(width: layout.size.width - 8.0, height: 32.0))
}
}