菜鸟教程小白 发表于 2022-12-11 19:40:35

ios - 使用 Swift 在 Today Extension(小部件)中显示警报


                                            <p><p>我有一个 Today Extension,我有一个文本字段和按钮,我想做的是 <code>if textfield.hasText == true</code> 做一些事情和 <code>if textfield.hasText == false</code> 然后我想在小部件中显示警报</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>首先,<strong>iOS Extensions</strong>中不允许<strong>Keyboard Entry</strong>,所以在<strong>Today Widget</strong>中有一个<code>UITextField</code> > 没有任何意义。</p>

<blockquote>
<p>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.</p>
</blockquote></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 使用 Swift 在 Today Extension(小部件)中显示警报,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/48481618/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/48481618/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 使用 Swift 在 Today Extension(小部件)中显示警报