I am trying to configure WKInterfaceTable. I followed the apples. My label does not receive text, and I get this error message in the console:
Cannot specify setter 'setTitle:' for properties of NSObject or WKInterfaceController
How can i fix this? Objective-C please. Here is my code:
.h
.m
#import "MainRowType.h" @implementation MainRowType @end
.h
.m
I call this method
- (void)configureTableWithData:(NSMutableArray*)dataObjects { [self.tableView setNumberOfRows:[dataObjects count] withRowType:@"mainRowType"]; for (NSInteger i = 0; i < self.tableView.numberOfRows; i++) { MainRowType* theRow = [self.tableView rowControllerAtIndex:i]; NSString *titleString = [dataObjects objectAtIndex:i]; [theRow.title setText:titleString]; } }
thanks
source share