开发者

Moving an UIView containing Buttons stops Buttons responding

开发者 https://www.devze.com 2023-01-14 01:38 出处:网络
I have an XIB file containing a subview (footerButtonsView) containing two buttons. I change the position of the subview like so:

I have an XIB file containing a subview (footerButtonsView) containing two buttons. I change the position of the subview like so:

if (footerView.frame.origin.y < 280.0) {    
    [footerButtonsView setFrame:CGRectMake(footerButtonsView.frame.origin.x, footerBut开发者_Go百科tonsView.frame.origin.y+300.0-footerView.frame.origin.y, footerButtonsView.frame.size.width, footerButtonsView.frame.size.height)];
}

This moves the view containing the buttons as expected but the buttons would not react to touches anymore. Does anyone have an idea on what I'm missing here? Thanks!


Looks like you're moving the view outside the bounds of its parent view?

0

精彩评论

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