Я пытаюсь найти, какое текстовое поле активно, когда я перемещаю представление, когда клавиатура поднимается. Я пытаюсь установить свойство в myviewcontroller из subview прокрутки.
Это код, который я использую для отображения представления в scrollview
-(void)displayView:(UIViewController *)viewController{
[[viewFrame subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];
[viewFrame scrollRectToVisible:CGRectMake(0, 0, 1, 1)
animated:NO];
[viewFrame addSubview: viewController.view];
_currentViewController = viewController;
}
- EDIT -
Я изменил свой образ мышления об этой проблеме. Извините, что вопрос был неоднозначным, когда я опубликовал его. В то время я был измотан, и это имело смысл в моей голове.
Другой, но похожий вопрос: существует ли общий подкласс как UITextArea, так и UITextView, который даст мне начало первогоResponder? Или мне нужно будет также проверить класс первогоResponder, прежде чем я смогу найти происхождение?