久久久久久久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 可縮放?)
主站蜘蛛池模板: 国产日韩欧美在线观看 | 欧美日韩亚洲国产 | 日韩成人av在线 | 手机看片在线播放 | 中文字幕1区 | 国产精品美女一区二区三区 | 欧美色综合一区二区三区 | 午夜av成人| 97免费视频在线观看 | 伊人网综合在线观看 | 亚洲免费观看 | 99精品久久久久 | 韩国av一区二区 | 91精品国产91久久久久久 | 欧美视频二区 | 狠狠干狠狠插 | 欧美日韩久久 | 成人在线 | 伊人激情网 | 华丽的挑战在线观看 | 日本在线视频中文字幕 | a级大毛片 | 不卡一区二区三区四区 | 一级特黄a大片 | 日本爱爱视频 | 亚洲成人国产精品 | 国产高清免费 | 高清黄色网址 | 91在线电影 | 国产精品欧美一区二区三区不卡 | 综合色在线 | 青青艹在线视频 | 一级片免费在线观看 | avhd101在线成人播放 | 国产永久免费 | 福利电影在线 | 一级做a爰片性色毛片16 | 日韩欧美国产一区二区 | 久久com | 色网在线观看 | 欧美日韩在线一区二区三区 |