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.
大家好
我正在尝试实现拉动和释放效果,例如UITableViewController在UIViewController.
UITableViewController
UIViewController
我正在尝试使用UIPanGestureRecognizer或可能是UIScrollview. 有什么帮助吗?
UIPanGestureRecognizer
UIScrollview
如果您只想显示和隐藏图像,我认为您可以有效地使用 UITouch 委托方法。
您可以检查触摸移动及其方向,并在以下位置显示您的图像:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
您可以将图像放回默认位置:
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
希望这可以帮助。