简体   繁体   中英

Detect pan Gesture Swipe Down in TableView

I have table view controller and which will show all the chatting messages. Inside that tableview controller I have stickers view where user can send stickers. I want to detect swipe down function in tableview and if user create swipe downs, I want to close stickers view if sticker view is already opened. Tableview has scrollview event also that's why I cannot detect swipe down event. My sticker view is same as fb messenger sticker view.

请查看随附的屏幕截图以查看贴纸视图

Instead of using a gesture, you should use the UIScrollviewDelegate methods to determine if the tableview has scrolled down, then trigger the desired behavior you want.

See this answer on how to implement it

  • for hiding inputview you can use tableview ' dismiss on dram ' attribute from storyboard,

故事板图像

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM