我有5X5个按钮网格。如果我按下位置1上的按钮然后按下位置2上的按钮,我希望位置1的按钮图像移动到位置2上的按钮。如下面的示例所示,先按A1按钮,然后按下B2按钮。
实施例:
将按钮图像从第一个按钮按下移至按下的第二个按钮
图:A1按钮按下
图:B2按钮按下
所以,总过程有两个步骤:
1. Prepare to move image when first button pressed
2. Move the image from first button to second button when the second button is pressed
我已经设置了5X5网格中显示的那25个按钮的按钮标签。现在我无法找到理想的行动逻辑。
什么是在这些方法的逻辑:
-(void)a1ButtonPressed:(id)sender
{
}
-(void)b2ButtonPressed:(id)sender
{
}
虽然按钮具有这些标记:
A1.tag = 1;
B2.tag = 7;
谁能帮助?在此先感谢.... :)
这是好事,但使用这些方法中的iOS 4和更高气馁。改为使用基于块的动画方法。 – Beppe 2012-04-09 11:29:03