OGeek|极客世界-中国程序员成长平台

标题: ios - 使用 Swift 在 Today Extension(小部件)中显示警报 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 19:40
标题: ios - 使用 Swift 在 Today Extension(小部件)中显示警报

我有一个 Today Extension,我有一个文本字段和按钮,我想做的是 if textfield.hasText == true 做一些事情和 if textfield.hasText == false 然后我想在小部件中显示警报



Best Answer-推荐答案


首先,iOS Extensions中不允许Keyboard Entry,所以在Today Widget中有一个UITextField > 没有任何意义。

Because user interaction with Today widgets is quick and limited, you should design a simple, streamlined UI that highlights the information users are interested in. In general, it’s a good idea to limit the number of interactive items in a widget. In particular, note that iOS widgets don’t support keyboard entry.

关于ios - 使用 Swift 在 Today Extension(小部件)中显示警报,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48481618/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4