未检测到mdctextinputcontrollerunderline

时间:2018-04-04 17:29:52

标签: material-components-ios

我一直在尝试在iOS上实施Material设计,我使用的是google材料组件

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'

0 个答案:

没有答案