In my current project I have a few viewcontrollers that use a UItextfield. As of now I have all the viewcontrollers set as delegates for the textField. However, I have all the same code for each of the viewcontrollers (at least for the UItextfield delegate methods). Is there a way I can just create a static class and set that as the delegate for all the UItextfields?
You can achieve using two ways.
myTextField
and implement all the delegate methods which you want to override. For all the instances where you want to use TextField and have the custom behavior use myTextField
.