Setting ViewController delegates in iPhone runtime
- by Stein Rune Risa
I am writing an iPhone application and needed to use the address book functionality. For this to work, it is necessary to specify a ABPeoplePickerNavigationControllerDelegate on the ViewController.
The problem is that I am creating all fields and buttons dynamically runtime, and thus does not have any custom ViewController - using only UIViewController class.
My question is then - how can I specify the delegate runtime without having to create a ViewController class just for this purpose.