Latest | 1.0.5 |
---|---|
Homepage | https://github.com/masashi-sutou/MSFormCell |
License | MIT |
Platforms | ios 8.0, requires ARC |
Authors |
FormCell
Overview
Demo |
---|
![]() |
Requirement
- Xcode 8
- Swift 3
- iOS 9.0 or later
Usage
// Example: phone number in Japan
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = FormFieldCell(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? FormFieldCell {
cell.textField.resignFirstResponder()
}
})
cell.textField.keyboardType = .numberPad
cell.textField.placeholder = "enter your phone number"
cell.textField.text = self.user.tel
return cell
}
Installation
CocoaPods
Add the following line to your Podfile:
use_frameworks!
target 'YOUR_TARGET_NAME' do
pod "FormCell"
end
Carthage
Add the following line to your Cartfile:
github "masashi-sutou/FormCell"
Licence
FormCell is available under the MIT license. See the LICENSE file for more info.
Latest podspec
{ "name": "MSFormCell", "version": "1.0.5", "summary": "MSFormCell is customized UITableViewCell for entry form.", "homepage": "https://github.com/masashi-sutou/MSFormCell", "license": { "type": "MIT", "file": "LICENSE" }, "source": { "git": "https://github.com/masashi-sutou/MSFormCell.git", "tag": "1.0.5" }, "source_files": [ "MSFormCell", "MSFormCell/**/*.{swift}" ], "requires_arc": true, "platforms": { "ios": "8.0" }, "ios": { "frameworks": [ "UIKit", "Foundation" ] }, "authors": { "masashi-sutou": "[email protected]" }, "pushed_with_swift_version": "3.0" }
Mon, 06 Mar 2017 12:00:33 +0000