Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/98.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 拉动和释放弹性效果控制器?_Iphone_Ios_Uiscrollview_Uipangesturerecognizer_Pull To Refresh - Fatal编程技术网

Iphone 拉动和释放弹性效果控制器?

Iphone 拉动和释放弹性效果控制器?,iphone,ios,uiscrollview,uipangesturerecognizer,pull-to-refresh,Iphone,Ios,Uiscrollview,Uipangesturerecognizer,Pull To Refresh,大家好 我正在尝试在UIViewController中实现一种拉动和释放效果,如在UIViewController中实现的拉动刷新 我正在尝试使用UIPangestureRecognitor,或者可能是UIScrollview。有什么帮助吗 如果您只想显示和隐藏图像,我认为您可以有效地使用UITouch委托方法 您可以检查触摸运动及其方向,并在以下位置显示您的图像: - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;

大家好

我正在尝试在
UIViewController
中实现一种拉动和释放效果,如在
UIViewController
中实现的拉动刷新

我正在尝试使用
UIPangestureRecognitor
,或者可能是
UIScrollview
。有什么帮助吗


如果您只想显示和隐藏图像,我认为您可以有效地使用UITouch委托方法

您可以检查触摸运动及其方向,并在以下位置显示您的图像:

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
您可以在以下位置将图像恢复到默认位置:

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;

希望这能有所帮助。

UIScrollView
已经内置了这种效果。您能告诉我们有关该场景的更多详细信息吗。请查找编辑我上传了一个屏幕截图:)您可以在UITableViewcell上创建视图,并添加pull以刷新。释放时重新加载tableview