我正在尝试为我的应用程序的Apple Watch版本创建一个进度圈.我知道我们无法使用UIViews(这将使事情变得如此简单!)所以我正在寻找替代方案.
基本上,我想创建其中一个原型:

我希望做的事情是将背景图层添加为普通的WKInterfaceImage,然后将顶部的进度箭头/线添加为基于计算的百分比围绕圆旋转的WKInterfaceImage.
我基本上计算了百分比,我正在寻找的是旋转箭头的数学代码的一些帮助.
有谁知道这是否可能,如果有的话,任何人都可以帮助我吗?我不是在应用程序运行时尝试更新圈子; 只需在Watch App启动时更新以与iOS版本对应.
谢谢!
规划手表套件集成
错误:WatchKit应用程序的Info.plist(1)中CFBundleVersion的值与随播应用程序的Info.plist(2.0)中的值不匹配.这些值需要匹配.
遇到上述错误.
- 更改了通知和watchkit应用程序的部署目标.但是构建失败了
谢谢.
更新到Xcode 7 beta后,我收到以下错误消息:"'openParentApplication(_:reply :)'在此处显式标记为不可用",运行代码行时"WKInterfaceController.openParentApplication"
这是我的实际代码:
func getData(messageText: String) {
let infoDictionary = ["message" : messageText]
WKInterfaceController.openParentApplication(infoDictionary) {
(replyDictionary, error) -> Void in
if let castedResponseDictionary = replyDictionary as? [String: String],
responseMessage = castedResponseDictionary["message"]
{
print(responseMessage)
}
}
}
Run Code Online (Sandbox Code Playgroud) 有没有办法在watchOS上获取扩展委托的实例?例如,我可以从接口控制器或手表扩展中的其他代码获取其实例吗?
在watchOS 2中,没有更多共享的钥匙串.
如果我想将iOS应用程序中的钥匙串值发送到Watch应用程序,是否可以通过WCSession updateApplicationContext发送它?
我正在尝试使用以下代码从手表模拟器启动我的iPhone应用程序:
WKInterfaceController子类
[WKInterfaceController openParentApplication:[NSDictionary dictionaryWithObject:@"red" forKey:@"color"] reply:^(NSDictionary *replyInfo, NSError *error) {
NSLog(@"replyInfo %@",replyInfo);
NSLog(@"Error: %@",error);
}];
Run Code Online (Sandbox Code Playgroud)
AppDelegate.m
- (void)application:(UIApplication *)application handleWatchKitExtensionRequest:(NSDictionary *)userInfo reply:(void(^)(NSDictionary *replyInfo))reply
{
NSLog(@"appdelegate handleWatchKitExtensionRequest");
NSLog(@"NSDictionary: %@",userInfo);
NSLog(@"replyInfo: %@",replyInfo);
}
Run Code Online (Sandbox Code Playgroud)
我得到的错误是:
错误:错误Domain = com.apple.watchkit.errors Code = 2"iPhone App中的UIApplicationDelegate从未调用reply() - [UIApplicationDelegate application:handleWatchKitExtensionRequest:reply:]"UserInfo = 0x7f8603227730 {NSLocalizedDescription = iPhone中的UIApplicationDelegate应用程序永远不会调用reply() - [UIApplicationDelegate application:handleWatchKitExtensionRequest:reply:]}
有谁知道Installed&Hidden属性之间有什么区别WKInterfaceLabel?
它们都显示/隐藏标签.

我有兴趣使用触觉反馈为watchOS 2构建应用程序.目前我没有Apple Watch,但我可以访问Apple Developer Program.我试过看看watchOS Developer Library和watchOS 2发行说明.
我没有看到任何提及如何以编程方式访问Taptic引擎或在当前watchOS 2中它能够实现的功能.
如何以编程方式访问Taptic引擎或了解新的Taptic API能够做什么?