开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜