Disable Multiline Text view
Wiwaltill opened this issue · 5 comments
Wiwaltill commented
It would be great if you could lock the input in your long text field. This would make it easier to display longer texts.
It would be an alternative to the long footer text and could be set via UserDefaults.
futuretap commented
You mean an IASKIsEditable
flag in the plist? Or something more dynamic using a delegate callback?
Wiwaltill commented
Yes, exactly. That's what I mean.
futuretap commented
You could subclass IASKAppSettingsViewController
and override -tableView:newCellForSpecifier:
:
- (UITableViewCell*)tableView:(UITableView *)tableView newCellForSpecifier:(IASKSpecifier*)specifier {
UITableViewCell *cell = [super tableView:tableView newCellForSpecifier:specifier];
if ([specifier.type isEqualToString:kIASKTextViewSpecifier]) {
((IASKTextViewCell*)cell).textView.editable = NO;
}
return cell;
}
Wiwaltill commented
futuretap commented
converted to Swift:
override func tableView(_ tableView: UITableView, newCellForSpecifier specifier: IASKSpecifier) -> UITableViewCell {
let cell = super.tableView(tableView, newCellForSpecifier: specifier)
if specifier.type == kIASKTextViewSpecifier {
(cell as? IASKTextViewCell)?.textView.isEditable = false
}
return cell
}