CocoaPods trunk is moving to be read-only. Read more on the blog, there are 13 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Mar 2017 |
| SwiftSwift Version | 3.0 |
| SPMSupports SPM | ✗ |
Maintained by owner.
| Demo |
|---|
![]() |
// Example: phone number in Japan
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = MSFormCell(lengthError: (0, 11), pregError: (.phone, nil))
cell.editField(beginEditing: nil, textChanged: { (text) in
self.user.tel = text
}, didReturn: {
if let cell = tableView.cellForRow(at: indexPath) as? MSFormCell {
cell.textField.resignFirstResponder()
}
})
cell.textField.keyboardType = .numberPad
cell.textField.placeholder = "enter your phone number"
cell.textField.text = self.user.tel
return cell
}MSFormCell is available under the MIT license. See the LICENSE file for more info.