Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 UIstepper 与 UIlabel 连接,以便 UIstepper 中“+”或“-”的值增加/减少 UIlabel 中的值/数字?该应用程序只有一个 viewvontroller,应该允许用户简单地向上(或向下)天数。
没有什么可以自动执行此操作。添加您的标签和步进器。设置一个动作来处理步进器。
在此操作方法的实现中,递增或递减类型的实例变量int以保持当前计数。获得新计数后,将值转换为字符串并使用新字符串设置标签的文本。
int