Goal C: Is it possible to set subview as firstResponder?

I have a situation where I am adding a view from another view manager to an existing view manager. For instance:

//set up loading page
self.myLoadingPage = [[LoadingPageViewController alloc]init ];
self.myLoadingPage.view.frame = self.view.bounds;
self.myLoadingPage.view.hidden = YES;

[self.view addSubview:self.myLoadingPage.view];

Is it possible to set "self.myLoadingPage" as the first responder? This is the case when the size of the loading page view does not cover the entire size of the existing view, and users can still interact with the superview (which is not the desired behavior). I want to just enable subview in this case.

+3
source share
3 answers

Interest Ask. I found a similar post with a quote from Apple Developer Forums on this issue:

, a - ( UIWindow ) hitTest: withEvent: , , .

, -, , ( API , 2010 .)

, , subviews superview userInteractionEnabled NO ( , , , ).

, .

+2

, UIView, , UIView UIView.

+3

- hitTest , TRUE. , hitTest , NORMALLY TRUE, , TRUE , , .

+3

All Articles