How assign a touch event from a UIButton to another?
I have t开发者_Python百科wo UIButton. One is on top of another (think is like a sub-label). But the second UIButton block the touch from his parent. So I want to attach the Touch handling from the sub-Button from his parent.
In other languages, I simply do object.event = object2.event
, but I can't figure how do this in obj-c.
I try this:
NSSet *t = [self.backgroundView allTargets];
NSArray *touch = [self.backgroundView actionsForTarget:self.backgroundView forControlEvent:UIControlEventTouchUpInside];
But both structs get empty.
精彩评论