我创建了一个应用程序,并在ViewController.m
,viewDidLoad
中编写了以下代码
for (UIView* v in self.view.subviews){
NSLog(@"View is %@",v);
NSLog(@"First Responder is %@",[v isFirstResponder]?@"YES":@"NO");
}
NSLog(@"First Responder is %@",[self isFirstResponder]?@"YES":@"NO");
NSLog(@"First Responder is %@",[self.view isFirstResponder]?@"YES":@"NO");
但它会NO
为一切带来回报。默认情况下我的第一响应者是什么?