简体   繁体   English

如何更新/刷新Apple Watch接口控制器?

[英]How to update/refresh an Apple Watch Interface Controller?

I'm looking for a way to update/refresh the Interface Controller in watchkit. 我正在寻找一种更新/刷新watchkit中的Interface Controller的方法。

Many iPhone apps employ a 'pull to refresh' or sometimes a way to reload the whole screen in a time bound manner. 许多iPhone应用程序都采用“拉动刷新”或有时以限时方式重新加载整个屏幕的方法。 I'm looking for something similar for Apple Watch, but can't find an appropriate function. 我正在为Apple Watch寻找类似的东西,但是找不到合适的功能。

(A hack will do. Preferably in swift.) (可以做到。最好是迅速采取行动。)

You can add a timer with a known interval to re-set the data in labels or other controls. 您可以添加一个具有已知间隔的计时器,以重新设置标签或其他控件中的数据。 For example, add the following code in the timer code: 例如,在计时器代码中添加以下代码:

Swift 迅速

text1.setText([DATA])

Objective-C 目标C

[text1 setText:[DATA]];

NOTE: Waiting for the new versions is always the best way. 注意:等待新版本始终是最好的方法。 WWDC 2015 (June 8-12) will announce the new versions of WatchKit in San Francisco. WWDC 2015(6月8日至12日)将在旧金山宣布WatchWatch的新版本。 They will introduce the ability of making native watch apps, and the missing APIs from WatchKit. 他们将介绍制作本地手表应用程序的功能以及WatchKit中缺少的API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何修复Apple Watch中页面Controller内缺少的接口controller? - How to fix missing interface controller inside Page Controller in Apple Watch? Apple Watch情节提要:不支持的配置-模态控制器无法访问接口控制器 - Apple Watch Storyboard: Unsupported Configuration - Interface Controller is unreachable for a modal controller 知道何时在Apple Watch Modal Interface Controller中单击取消按钮 - Know When Cancel Button is Clicked in Apple Watch Modal Interface Controller 苹果手表界面 - Apple watch interface Apple手表使用背景刷新 - Apple watch using background refresh 在Apple Watch中管理Glance界面 - Manage Glance Interface in Apple Watch 如何创建和索引Apple Watch界面页面 - How do you create and index Apple Watch interface pages Apple Watch Table控制器未加载 - Apple Watch Table Controller Not Loading 独立于活动接口控制器在Apple Watch上显示消息的最佳方法是什么? - What is the best way to show a message on Apple Watch independently of the active interface controller? 为什么我们不能在Apple Watch故事板上的一个界面控制器上使用关系顺序和动作顺序(推动)? - Why can't we use relationship segue and action segue (push) for one interface controller in Apple watch storyboard?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM