Yesterday, a bug was sent. A third-party control has been applied. All good, the effect comes out to meet the requirements.
When you are ready to finish, test again, and find a very serious consequence of the Bug,view on the button event is gone.
After a variety of tests, it was discovered that the newly introduced third-party control was caused.
Step through the comments code. Found
(ID) HitTest: (cgpoint) point withevent: (uievent *) event usage caused, see here suddenly, this method commented out, everything is normal.
HitTest function: When a shield is added to a view, but does not affect the operation of the view below, that is, the following view can be manipulated through the shielding hood, this function is very useful.
HitTest usage: Add the following function to the UIView subclass, which is the Mask class.
-(ID) hitTest: (cgpoint) point withevent: (Uievent *) event
{
UIView *hitview = [Super Hittest:point withevent:event];
if (Hitview = = self)
{
return nil;
}
Else
{
return hitview;
}
}
In the third-party control code, the Superview is returned, causing the problem.
Now when is the review, the previous knowledge, write a thing, record.
View can be displayed beyond the parent view, but cannot handle events.
Important events say three times:
View can be displayed beyond the parent view, but cannot handle events,-(ID) hitTest: (cgpoint) point withevent: (Uievent *) event
View can be displayed beyond the parent view, but cannot handle events,-(ID) hitTest: (cgpoint) point withevent: (Uievent *) event
View can be displayed beyond the parent view, but cannot handle events,-(ID) hitTest: (cgpoint) point withevent: (Uievent *) event
can cause problems, there is the event to be registered to the corresponding target.
The use of Ioshittest