押したときに大きくなるUIButtonを作成しようとしています。現在、私は(Tim's answerの礼儀)私のボタンのダウンイベントに次のコードを持っている:実行しかし押したときにUIButtonが移動する
#define button_grow_amount 1.2
CGRect currentFrame = button.frame;
CGRect newFrame = CGRectMake(currentFrame.origin.x - currentFrame.size.width/button_grow_amount,
currentFrame.origin.y - currentFrame.size.height/button_grow_amount,
currentFrame.size.width * button_grow_amount,
currentFrame.size.height * button_grow_amount);
button.frame = newFrame;
この私のボタンを上に移動し、それが押されていますたびに左になります。何か案は?
これは働いていました!ありがとう! – RCIX
私の側からも有益な感謝....投票.... – Saawan