Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的目标是在图像视图到达屏幕一侧时删除它。它应该是一个子弹,当它的 x 值达到某个值时,它会被删除。这是传感器的代码,但一旦达到 120,我希望将其删除:
CGRect frame = Image.frame; if (frame.origin.x>120) { NSLog(@"delete"); }
要删除图像视图,请执行此操作。
[myImageView removeFromSuperview];
(myImageView您的图像视图的名称在哪里)
myImageView