ios - How do I determine which UIView superview is causing the subview to have userInteractionEnabled = NO? -


I have UIView that is showing with userInteractionEnabled = NO and I do not know why the settings in the interface builder enabled user interaction All the ideas have to be seen and there is nothing in the code, the user does not set the interaction for it. If I inspect the values ​​during debugging, however, user interaction is enabled in view and all supervisors == NO.

I used the following code in the view controller to loop all the views and inspect their interaction status and even set the clearly enabled value to Yes:

  BOOL * is enabled = self.someView.userInteractionEnabled; NSArray * _allViews = self.someView.window.subviews; (For _allViews in UIView * currentView) {currentView.userInteractionEnabled = YES; Is controlled = currentView.userInteractionEnabled; } Is enabled = self.someView.userInteractionEnabled;  

This process is in each stage, the enabled variable is not always even if I set user interaction for use.

What am I missing here?

Edit:

Adding debug code to RMDI and receiving a little more I get it:

  UIView * view = self.someView ; While (see) {enable = view.userInteractionEnabled; If (! View.userInteractionEnabled) {NSLog (@ "View is not enabled:% @", see); View.userInteractionEnabled = Yes; } View = View. Superviv; }  

When I move through that animated variable, it does not always happen, but if (! View.userInteractionEnabled) argument is never used, how can it be both? Is there something about Object-C bool that I do not understand?

Now it is very confused.

Try starting in the subview and running up to the supervision series.

  UIView * view = self.someView; While (see) {if.userInteractionEnabled} {NSLog (@ "View is not enabled:% @", see); View.userInteractionEnabled = Yes; } View = View. Superviv; }  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -