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

在 iOS 8 Today Extensions 中拖動手勢

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

問題描述

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

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

解決方案

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

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

iOS 8.0 中的粗略架構(gòu)是:

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

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

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.

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

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

相關(guān)文檔推薦

how to set scrollview content size in swift 3.0(如何在 swift 3.0 中設(shè)置滾動視圖內(nèi)容大小)
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 模擬器上運(yùn)行時,使用 iOS 6.0 SDK 并為 iOS 5 Target 構(gòu)建會導(dǎo)致 UIScrollView setMinimumZ
Create partial-screen UIPageViewController programmatically(以編程方式創(chuàng)建部分屏幕 UIPageViewController)
how to make an ImageView zoomable with or without ScrollView.?(如何使用或不使用 ScrollView 使 ImageView 可縮放?)
主站蜘蛛池模板: 亚洲欧美日韩精品久久亚洲区 | 成人在线观看免费视频 | 成人精品影院 | 久久久久久久久久一区 | 精品福利在线 | 蜜桃臀av一区二区三区 | 岛国视频 | 91青娱乐在线 | 黄色毛片免费 | 久久久精品一区 | 国内精品视频在线观看 | 91精品国产乱码久久久久久久久 | 日韩国产欧美一区 | 美女拍拍拍网站 | 69热视频在线观看 | 久久久久久国模大尺度人体 | 久久久久中文字幕 | 久久视频精品 | 黄色毛片黄色毛片 | 日韩在线视频免费观看 | 看一级黄色毛片 | 成人做爰9片免费看网站 | 五月花丁香婷婷 | 中文字幕 在线观看 | 日韩在线播放第一页 | 伊人春色成人网 | 国产伦一区二区三区视频 | 国产一区二区 | 一区二区国产精品 | 亚洲女优在线播放 | 免费亚洲婷婷 | 91精品一区 | 开操网 | 欧美精品一区二区在线观看 | 国产精品久久久久久久久久久久久 | 丝袜一区二区三区 | 羞羞视频免费观看入口 | 国产成人午夜电影网 | 国产在线精品一区二区 | 黄色成人免费看 | 毛片一级电影 |