【发布时间】:2011-06-29 04:10:37
【问题描述】:
我正在尝试使用 UITouch 迁移到 UIImageViews。 我有 2 个 imageViews 说 image1 和 image2。我在 .h 文件中将这些声明为 UIIMageView *image1; UIImageView *image2;
现在在 touchesBegan 方法中,要拖动一个 imageView,我使用 if 条件如下
if([touch view] = image1){
image1.center = location;
}
else if([touch view] = image2){
image2.center = location;
}
位置是 CGPoint。
使用此代码,当我构建 n 运行程序时,两个图像相互重叠并一起移动。 我想单独移动它们。
请提供一些帮助或任何错误...
【问题讨论】:
标签: objective-c ios4 uibutton uitouch