When you build a lot of equal object is a good design partner set a tag to identifier, so:
UITextField *object1, *object2;
//Initialize it
[object1 setDelegate:self];
[object2 setDelegate:self];
[object1 setTag: 1];
[object2 setTag: 2];
To be more easy and “beautiful” understand the code, you can create a enum.
typedef enum {
MyTextField1 = 1,
MyTextField2
} allTextField;
So, you will not put just a number and can set tag in this way:
[object1 setTag: MyTextField1];
[object2 setTag: MyTextField2];
Than in any delegate function you can treat it more easy
- (BOOL)textFieldShouldClear:(UITextField *)textField {
switch(textField.tag) {
case MyTextField1: return YES;
case MyTextField2: return NO;
}
}
But, when you will build in Interface Builder in XCode, you can set the tag in this field:

But if I set it, I will receive:

There is no way to set the tag anything than a number in Interface Builder?
There is no way to use an enum in IB. Because IB files are serialized objects. And when they get loaded at run time, they can’t make the reference to the name of the enum.