Это довольно зависит от того, какой ученик и какой программист Вы, но:
Используйте NSNotificationCenter
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(keyPressed:) name: UITextFieldTextDidChangeNotification object: nil];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(keyPressed:) name: UITextViewTextDidChangeNotification object: nil];
........
-(void) keyPressed: (NSNotification*) notification
{
NSLog([[notification object]text]);
}
Непростой ответ, но я думаю, что у вас есть два доступных подхода.
подклассифицируйте входные компоненты (UITextView, UITextField и т. Д.), Как вы это сделали с UIWindow.
Создайте для всего приложения UITextViewDelegate (и UITextFieldDelegate) и назначьте ему всех делегатов поля ввода.