I have an UIViewController subclass that allows the user to add a new model object, in this case a bank account. I named the view controller AddBankAccountViewController. The user can enter the account number, an account label and the bank of the account, but this is all done in separate view controllers.
I’m using delegation to let AddBankAccountViewController know that the user has changed values. The result is that AddBankAccountViewController now conforms to 3 custom made protocols (ie. EditAccountNumberViewControllerDelegate, etc.), and it may be even more in the future.
My question is: is this the correct way to do this, or is there a better way (for instance a direct link from the view controllers to the AddBankAccountViewController)?
Delegation is fine. You might want to sum related methods up in a common (maybe optional) protocol. Or you could use target/action pattern, but delegation is probably what you want most of the time.