开发者

Add UIViewController over another but buttons on parent still clickable

.m file.

- (IBAction)switchViewThinking:(id)sendr {

    [self.view addSubview:pick.view];
    pick.view.alpha=1.0;
    [pick animate];
}

The view pops up fine. Only the buttons on the parent view are still clickable behind the subview that overlays it. Also pick is a UIViewController. The parent view has 3 buttons each open a differnt subview. On the subviews buttons a开发者_开发问答re not clickable through UITables or Scrolltext. Linkage is correct and views remove and activate when needed to. Is there a setting I'm missing that would cause this? Whats the best solution to overcome this. Thanks


You'll have to either re-create the buttons on the top layer (maybe as transparent clickable views) or make the top layer smaller so that it doesn't obstruct the buttons below it. Instead of one large view on top, you could create many smaller views that look like one view,but that still allow the buttons beneath to be visible and clickable.

In any case, I'd advise thinking whether you really want this behavior. Seems a little like it would not be intuitive for the end user.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜