I want to have a CellTextField within a UITableViewCell only accept numeric chars.
I programmatically create UITableViewCells like this:
-(UITableViewCell*) getCellContentView: (NSString*) cellIdentifier {
...
UITableViewCell *cell = [[UITableViewCell alloc] initWithFrame:cellFrame reuseIdentifier:cellIdentifier];
...
CellTextField *txt;
txt = [[CellTextField alloc] initWithFrame:amountFrame];
... //here we should setup a delegate or similar to handle char validation for txt
[cell.contentView addSubview:txt];
return cell;
}
For the UITextField component we have a Delegate ‘shouldChangeCharactersInRange’ but I can’t find the equivalent for CellTextFields.
try this one
.h
.m