【发布时间】:2012-04-09 09:05:30
【问题描述】:
我有 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;
有人可以帮忙吗?在此先感谢.... :)
【问题讨论】:
标签: iphone cocoa-touch ios4 logic