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

在 iOS 8 Today Extensions 中拖動手勢

Dragging Gestures in iOS 8 Today Extensions(在 iOS 8 Today Extensions 中拖動手勢)
本文介紹了在 iOS 8 Today Extensions 中拖動手勢的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我在 Today 小部件中使用了 UIView 子類.該視圖使用滑動手勢.但是,這些手勢要么上下滾動整個通知中心,要么讓通知中心從 Today 切換到 Notifications.

有什么方法可以防止觸摸事件冒泡到通知中心滾動視圖?在子類中使用[self setExclusiveTouch:YES];并沒有解決,很遺憾.

解決方案

有什么方法可以防止觸摸事件冒泡到通知中心滾動視圖?使用 [self setExclusiveTouch:YES];不幸的是子類中沒有解決.

沒有.由于您的 Today 小部件在內部呈現遠程視圖托管,[self setExclusiveTouch:YES] 并不能完全滿足您的需求.

iOS 8.0 中的粗略架構是:

<上一頁>[用戶觸摸創建一個UITouch]|v通知中心(UIScrollView)|vUIRemoteView 容器(呈現你的 UIView)[跨越流程邊界]|v你的 Today 小部件的 UIView

當觸摸越過進程邊界時,就可以認為它基本上是被克隆的.您的視圖的專有觸摸需求僅與您的小部件的進程空間/窗口相關,并且不會向外傳播到遠程托管您的通知中心.

I'm using a UIView subclass in my Today widget. The view makes use of swiping gestures. However, these gestures either scroll the whole Notification Center up and down, or make the Notification Center switch from Today to Notifications.

Is there any way to prevent the touch events to be bubbled up to the Notification Center scroll view? Using [self setExclusiveTouch:YES]; in the subclass did not solve it unfortunately.

解決方案

Is there any way to prevent the touch events to be bubbled up to the Notification Center scroll view? Using [self setExclusiveTouch:YES]; in the subclass did not solve it unfortunately.

No. Because of the remote view hosting that your Today widget is being presented inside, [self setExclusiveTouch:YES] doesn't quite do what you want.

The rough architecture in iOS 8.0 is:

[User touch creates a UITouch]
            |
            v
Notification Center (UIScrollView)
            |
            v
  UIRemoteView container
  (presents your UIView)
[crosses process boundary]
            |
            v
your Today widget's UIView

Think of the touch as basically becoming cloned when it crosses the process boundary. Your view's exclusive touch desires are only relevant in your widget's process space/window, and don't propagate back outwards to the Notification Center which is hosting you remotely.

這篇關于在 iOS 8 Today Extensions 中拖動手勢的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

how to set scrollview content size in swift 3.0(如何在 swift 3.0 中設置滾動視圖內容大小)
Stop a UITableView from automatically scrolling(阻止 UITableView 自動滾動)
iOS UIScrollView Lazy Loading(iOS UIScrollView 延遲加載)
using iOS 6.0 SDK and building for iOS 5 Target causes UIScrollView setMinimumZoomScale to fail when running on iOS 5 simulator(在 iOS 5 模擬器上運行時,使用 iOS 6.0 SDK 并為 iOS 5 Target 構建會導致 UIScrollView setMinimumZ
Create partial-screen UIPageViewController programmatically(以編程方式創建部分屏幕 UIPageViewController)
how to make an ImageView zoomable with or without ScrollView.?(如何使用或不使用 ScrollView 使 ImageView 可縮放?)
主站蜘蛛池模板: 丁香久久 | 免费看国产片在线观看 | 成人精品一区二区三区中文字幕 | 欧美成人h版在线观看 | 中文字幕一级毛片视频 | 激情一区二区三区 | 91精品国产91久久久久久密臀 | 91毛片在线观看 | 免费一级做a爰片久久毛片潮喷 | 日本在线中文 | 日韩一区二区三区在线观看 | 狠狠色综合久久婷婷 | 国产女人与拘做视频免费 | 久久高清精品 | 精品一区免费 | 国产视频黄色 | 久久精品视频一区二区三区 | 看亚洲a级一级毛片 | 日本久久精品 | 日本免费小视频 | 欧美中文字幕一区二区三区亚洲 | 成人精品免费视频 | 精品一区二区三区在线观看国产 | 国产精品久久久久久久久久东京 | 久久久久久久久国产成人免费 | 亚洲人成一区二区三区性色 | 久久久黄色 | 国产精品亚洲综合 | 国产一区二区三区日韩 | 亚洲 欧美 日韩在线 | 天天综合网7799精品 | 久久久久久久一区 | 国产精品美女一区二区三区 | 亚洲精品一区在线观看 | 性色av香蕉一区二区 | 中文字幕 视频一区 | 福利成人| 亚洲国产欧美在线人成 | 日本一区二区视频 | 国产精品久久久久av | 国产真实精品久久二三区 |