开发者

UIView drag event

开发者 https://www.devze.com 2023-01-06 08:27 出处:网络
I have an slide show application. There is a UIView on main screen, I want when someone slide his fingers 开发者_运维知识库horizontally it moves to next screen.

I have an slide show application. There is a UIView on main screen, I want when someone slide his fingers 开发者_运维知识库horizontally it moves to next screen.

What this event is called? (slide fingers horizontally/vertically)

How can i detect this event? Want to call a method xyz on this event


You might be looking for a Page Control.

If not, then you can use touchesMoved:withEvent: to detect the drag event. In this event handler you need to compare the coordinates to detect whether it is moving horizontally or vertically.

0

精彩评论

暂无评论...
验证码 换一张
取 消