문제

My code to change button size when press:

  [_btnClick setImage:image forState:UIControlStateNormal];
    //  oldPosition =CGPointMake(sender.bounds.origin.x, sender.bounds.origin.y);
  _btnClick.frame = CGRectMake(oldPosition.x+20  , oldPosition.y+10, 500, 500);

but when i press button, just image change and button size not change to new size.

How i fix it. Thank' for help.

도움이 되었습니까?

해결책

In a related question, an explanation is provided. The only thing that seems valid would be to do what the top answer says. Disable Auto layout

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top