代码之家  ›  专栏  ›  技术社区  ›  ChrisB

移动包含按钮的uiview会停止按钮响应

  •  1
  • ChrisB  · 技术社区  · 14 年前

    我有一个包含子视图(footerButtonsView)的XIB文件,其中包含两个按钮。我像这样改变子视图的位置:

    if (footerView.frame.origin.y < 280.0) {    
        [footerButtonsView setFrame:CGRectMake(footerButtonsView.frame.origin.x, footerButtonsView.frame.origin.y+300.0-footerView.frame.origin.y, footerButtonsView.frame.size.width, footerButtonsView.frame.size.height)];
    }
    

    这将按预期移动包含按钮的视图,但按钮将不再对触摸做出反应。有人知道我在这里遗漏了什么吗? 谢谢!

    1 回复  |  直到 14 年前
        1
  •  3
  •   Simon Whitaker    14 年前

    看起来您要将视图移出其父视图的边界?