久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

ios 8 - 水平滾動視圖中的按鈕攔截平移事件 - 滾動

ios 8 - buttons in horizontal scroll view intercepting pan event - scroll does not work(ios 8 - 水平滾動視圖中的按鈕攔截平移事件 - 滾動不起作用)
本文介紹了ios 8 - 水平滾動視圖中的按鈕攔截平移事件 - 滾動不起作用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個帶有一行按鈕的水平滾動視圖.除非我非常快速地滑動,否則滾動視圖不會滾動.

I have a horizontal scroll view with a line of buttons. The scroll view will not scroll unless I do an extremely fast swipe.

如果我將按鈕設置為 userInteractionEnabled = NO,則滾動按預期工作,但當然,按鈕根本不起作用.

If I set the buttons to userInteractionEnabled = NO, then the scrolling works as expected, but of course, then the buttons don't work at all.

此應用在 iOS 7 及之前的版本中運行良好.這似乎是 iOS 8 的功能".我確實注意到我可以捕獲按鈕的拖動事件,但我不知道如何將其重定向回滾動視圖.

This app worked fine in iOS 7 and before. It seems to be a iOS 8 "feature". I did notice that I can catch the button's drag event, but I don't know how to redirect it back to the scrollView.

我想我需要用 UIView 替換我的按鈕并自己管理事件,但如果有人有其他想法或解決方案,我將不勝感激.

I'm thinking I'll need to replace my buttons with UIViews and manage the events myself but I'd be grateful if someone has other ideas or solutions.

推薦答案

我發現在 iOS 8 中,UIScrollView 的底層 UIPanGestureRecognizer 不尊重 UIScrollView 的 delaysContentTouches 屬性.我認為這是一個 iOS 8 錯誤.這是我的解決方法:

I found that in iOS 8, the UIScrollView's underlying UIPanGestureRecognizer is not respecting the UIScrollView's delaysContentTouches property. I consider this an iOS 8 bug. Here's my workaround:

theScrollView.panGestureRecognizer.delaysTouchesBegan = theScrollView.delaysContentTouches

這篇關于ios 8 - 水平滾動視圖中的按鈕攔截平移事件 - 滾動不起作用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to subclass UIScrollView and make the delegate property private(如何繼承 UIScrollView 并使委托屬性私有)
Swift - how to get last taken 3 photos from photo library?(Swift - 如何從照片庫中獲取最后拍攝的 3 張照片?)
Setting contentOffset programmatically triggers scrollViewDidScroll(以編程方式設置 contentOffset 觸發 scrollViewDidScroll)
Photos app-like gap between pages in UIScrollView with pagingEnabled(使用 pagingEnabled 的 UIScrollView 中頁面之間的照片應用程序式間隙)
why UIScrollView is leaving space from top in ios 6 and ios 7(為什么 UIScrollView 在 ios 6 和 ios 7 中從頂部留下空間)
UIScrollView pauses NSTimer while scrolling(UIScrollView 在滾動時暫停 NSTimer)
主站蜘蛛池模板: 天天躁日日躁狠狠很躁 | 亚洲国产成人精品女人久久久 | 精品国产一区二区在线 | 婷婷综合网 | 久久中文字幕一区 | 久久av一区二区三区 | 国产精品a久久久久 | 91黄色片免费看 | 亚洲三区视频 | 麻豆精品国产91久久久久久 | 日韩aⅴ视频 | 精品国产一区一区二区三亚瑟 | 日韩成人av在线播放 | 亚洲天堂中文字幕 | 91精品国产一区二区三区香蕉 | 久久99精品国产自在现线小黄鸭 | 一区二区三区免费在线观看 | 中文字幕在线三区 | 国产午夜精品福利 | 欧美在线视频一区二区 | 国产精品永久免费视频 | 找个黄色片 | 日本一区二区三区四区 | 天天操天天玩 | 国产精品永久免费视频 | 91精品国产综合久久婷婷香蕉 | 欧美一区二区三区视频 | 欧美一区二区三区免费在线观看 | а_天堂中文最新版地址 | 久久久精品一区二区三区 | 黄色片免费看 | 爱爱免费视频网站 | 97国产精品视频 | 精品国产一区二区三区久久久四川 | 美女三区| 精品国产18久久久久久二百 | 日韩中文字幕一区二区 | 日韩视频在线一区二区 | 国产欧美在线一区二区 | 亚洲精品乱码久久久久久9色 | 风间由美一区二区三区在线观看 |