我一直在尝试在 iOS 上实现材料设计,我正在使用谷歌材料组件
class ViewController: UIViewController{
let userNameTextField : MDCTextField = {
let textFieldFloating = MDCTextField()
textFieldFloating.placeholder = "Full Name"
return textFieldFloating
}()
override func viewDidLoad() {
view.addSubview(m_userNameTextField)
m_userNameTextField.acnchor(top: signUpButton.bottomAnchor, left: view.leftAnchor, bottom: nil, right: view.rightAnchor, paddingTop: 20, paddingLeft: 40, paddingBottom: 0, paddingRight: 40, width: 0, height: 200 )
m_userNameTextField.delegate = self as? UITextFieldDelegate
let mUsernameController = MDCTextInputControllerUnderline
mUsernameController = MDCTextInputControllerUnderline(textInput: m_userNameTextField)
super.viewDidLoad()
}
}
MDCTextInputControllerUnderline 得到错误:
使用未解析的标识符“MDCTextInputControllerUnderline”