IOS 响应事件传递nextResponder
官方解释
UIView implements this method by returning the UIViewController object that manages it (if it has one) or its superview (if it doesn’t); UIViewController implements the method by returning its view’s superview; UIWindow returns the application object, and UIApplication returns nil.
id next = [self nextResponder];while(![next isKindOfClass:[ViewController class]]) { next = [next nextResponder];}if ([next isKindOfClass:[ViewController class]]) { controller = (ViewController *)next;}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。