- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在使用 UNNotificationContentExtension,我已经创建了一个包含 ScrollView 的自定义 UI。我用 ImageView 加载 ScrollView ,它是一个图像轮播,图像轮播应该水平移动。
我的 ScrollView 设置正确,但 ScrollView 不水平滚动。
我通过以编程方式滚动来检查我的图像是否在轮播中
scrollView.setContentOffset(CGPoint(x: x, y: y), animated: true)
另外,我的每张图片都应该在我的应用程序中打开不同的页面。所以我所做的是将点击手势添加到各个 imageViews。
所以我的问题是,
UNNotificationContentExtension 是否可以在水平方向上平移 scrollView?
是否可以根据点击的图片在应用中打开不同的页面?
最佳答案
So my questions are,
Is it possible for UNNotificationContentExtension to translate a scrollView in horizontal direction?
Is it possible to open different pages in app based on the images clicked?
没有也没有。 UNNotificationContentExtension 不以任何方式与用户交互,除了运行时根据请求为您插入的播放按钮等元素。
编辑:请注意,这在 iOS 11 及之前的版本中是正确的,但在 iOS 12 中发生了变化,在 Info.plist 的 NSExtensionAttributes 中成为可能,添加 UNNotificationExtensionUserInteractionEnabled
bool 键并将其值设置为 YES
。现在,整个用户交互机制都栩栩如生了。
关于ios - UNNotificationContentExtension 可以处理滑动吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41778496/
我一直在使用 UNNotificationContentExtension,我已经创建了一个包含 ScrollView 的自定义 UI。我用 ImageView 加载 ScrollView ,它是一个
我正在尝试制作自定义通知警报。我添加了扩展目标并将 UNNotificationExtensionCategory 值更改为“绘图”。 在我的推送通知中,我向 aps block 添加了一个 "cat
我制作了一款ios游戏。我需要添加具有三个操作的高级 ios 10 通知(如 UNNotificationAction)。其中一项操作必须运行我的游戏。我已经使用 didReceive 函数(带有 U
将内容扩展添加到我的应用程序的通知处理中。我让它工作,但我想在没有直接指定 Storyboard 的情况下进行。原因是我希望能够将其传递给第 3 方框架(我正在开发)来处理通知的显示和管理用户响应。
我一直致力于在 iOS10 中引入丰富的通知体验,并坚持将图像作为附件传递给 UNNotificationContentExtension . 这是我的 ContentExtension: class
我用了UNNotificationContentExtension从用户那里进行调查。 条件是我没有打开父应用程序。 这是表情符号 Action if #available(iOSApplic
UNNotificationServiceExtension 和 UNNotificationContentExtension 之间有什么区别。 什么是一个人能做而另一个人不能做的事情。我已经阅读了文
我正在尝试使用新的 UNNotificationContentExtension 来显示本地通知的自定义用户界面,但只显示默认通知警报。 我使用 Xcode 模板创建了扩展,并在 Info.plist
我想创建 UNNotificationContentExtension 来显示一些自定义 UI。为此,我必须为 UNNotificationContentExtension 创建一些类别,并在安排通知
我正在尝试在 iOS 10 中添加自定义通知,该通知使用强制按下丰富的通知。我想以编程方式将 View 添加到继承自 UNNotificationContentExtension 的 View Con
我使用代码在 UNNotificationServiceExtension 中下载接收到通知的图像 override func didReceive(_ request: UNNotification
背景: 我已经实现了一个 UNNotificationContentExtension 以便我可以格式化接收到的 APNS 数据并根据我的需要呈现它,如下所示 我希望用户点击星星并评分,所以我在 UN
我是一名优秀的程序员,十分优秀!