FUIInlineValidationTableViewCell
open class FUIInlineValidationTableViewCell : NibDesignableFUIBaseTableViewCell, FUIInlineValidation, FUIAccessoryViewDelegate
FUIInlineValidationTableViewCell
is a base class for FUIFormCell
s that need to support validation handling. The validation view will appear at the bottom of cell if validation message is set.
Code usage:
- Custom class should subclass FUIInlineValidationTableViewCell to enable validation handling. Create a bottom constraint on main view and contentView and assign to
validationViewHeight
property.
public class FUITitleFormCell: FUIInlineValidationTableViewCell, FUIFormCell, UITextFieldDelegate {
public override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
//Any setup code
self.validationViewHeight = self.stackViewBottom
}
}
- Set validationMessage on the cell.
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: FUITitleFormCell.reuseIdentifier, for: indexPath) as! FUITitleFormCell
//Configure your cell
cell.validationMessage = "Validation msg"
}
-
Type of the accessory view
Declaration
Swift
@IBInspectable override open var accessoryType: UITableViewCellAccessoryType { get set }