- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 iOS SDK 8.3 并尝试遵循 this tutorial在 watch 套件应用中创建表格。
我在 iWatch 应用程序的界面 Controller 上添加了一个表,然后将其链接到我的界面 Controller 。我创建了一个自定义行类并将该行链接到行 Controller 类。然后我在行中添加了几个项目并将它们链接到行 Controller 类中的 socket 。但是我得到了一些错误:
这是我的接口(interface) Controller 类:
#import <WatchKit/WatchKit.h>
#import <Foundation/Foundation.h>
@interface InterfaceController : WKInterfaceController
@property (strong, nonatomic) NSArray *devicesArray;
@property (weak, nonatomic) IBOutlet WKInterfaceGroup *devicesTable;
@end
这是触发错误的代码:
- (void)awakeWithContext:(id)context {
[super awakeWithContext:context];
NSLog(@"%@ initWithContext", self);
self.devicesArray = @[@"type A", @"type B"];
[self.devicesTable setNumberOfRows:self.devicesArray.count withRowType:@"MyTableRowController"];
[self.devicesTable enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
MyTableRowController* row = [self.devicesTable rowControllerAtIndex:idx];
[row.deviceType setText: (NSString*)obj];
[row.logo setImage:[UIImage imageNamed:(NSString *)obj]];
}];
最佳答案
您的 devicesTable
声明为 WKInterfaceGroup
它确实支持您正在调用的方法。我确定您打算使用 WKInterfaceTable
.您可能无意中从组中拖出了表的连接,而不是 Interface Builder 中的表。
关于ios - 'WKinterfaceGroup' 没有可见的@interface 声明选择器 : has something changed in iOS 8. 3?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29651348/
简单的问题:是否可以堆叠一个 WKInterfaceLabel在另一个内部的顶部 WKInterfaceGroup ?我像个疯子一样拖着,我无法将蓝色目标线设置在第一个标签的上方或下方。它会坐在它旁边
此问题中的解决方案* 使用 setHidden 来隐藏和取消隐藏 WKInterfaceGroup: atypeofGroup.setHidden(true) atypeofGroup
我正在使用 xCode 6.2 beta 2 并尝试以编程方式隐藏和显示组,但没有显示我可以编写 group.hidden=YES 或 group.hidden=NO 的方法有没有其他方法可以做到这一
我正在创建一个 WatchKit 2.0 应用程序,其中包含成员之间的对话。在对话线程中,我希望将 WKInterfaceGroup's 半径设置为 3 个角,如下所示: 在界面生成器中,我知道您只能
有没有办法以编程方式访问 WKInterfaceGroup 的子元素,而不是 Ctrl + 从界面构建器中拖动? 最佳答案 不,WatchKit 不允许您以编程方式访问接口(interface)对象属
(使用iOS8.3、Xcode6.3、OSX10.10.3) 嗨,我想知道 WatchKit WKInterfaceGroup 是否可以是按钮?? 在我的 watchkit 应用程序中,我想针对特定操
我在 WKInterfaceGroup 中有一个带有长文本的标签和一个按钮。我可以在按钮的触摸处理程序上将组滚动到顶部吗? 最佳答案 您可以从 WatchOS 4 开始执行此操作。WKInterfac
如何以编程方式获取 WKInterfaceGroup 对象的背景颜色? 您可以 set the value使用 - (void)setBackgroundColor:(nullable UIColor
我正在显示带有如下标签的圆形进度条: 我通过创建 WKInterfaceGroup 并将其图像设置为动画图像来实现此目的,然后我将 WKInterfaceLabel 居中放置。现在我想在用户单击标签或
我正在使用 iOS SDK 8.3 并尝试遵循 this tutorial在 watch 套件应用中创建表格。 我在 iWatch 应用程序的界面 Controller 上添加了一个表,然后将其链接到
我知道这个问题可能看起来很奇怪,但我看到的这个 YouTube 视频正是我想要的。基本上在视频中它显示了一个侧面有彩色条纹的“WKInterfaceGroup”。我想知道是否有一种本地方法可以做到这一
我是一名优秀的程序员,十分优秀!