I have used Cocoapods to integrate MaterialsComponents with a new Xcode Project and entered Xcode via the Workspace. I then created a very basic interface with one UITextField added to the main.storyboard. I did a build without errors and the simple interface allows me to enter data into the UITextField.
So then, copying Google's code sample in their lesson MDC-111, I converted the UITextField to an MDCTextField to see if the special Material Design handling of a Text Field works (i.e. the placeholder text moves up as I enter text). I had no build errors and the project correctly built in the simulator but does not allow text entry. Clicking on the field does not bring up the keyboard and does not accept text. I have tried changing the "User Interaction Enabled" from On to Off and back to On with no effect.`This is my Swift View Controller code:
import UIKit
import MaterialComponents
class ViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var helloText: MDCTextField!
// MARK: Properties
var helloController: MDCTextInputControllerOutlined?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
helloController = MDCTextInputControllerOutlined(textInput: helloText)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}