I have 2 Interface Controllers in my WatchKit. The first one is called InterfaceController while the other is called DetailsForWatch. IC has a tableView on it. It parses data from a Parse class, and displays data from each entry in the class as a row. This works fine.
What I am trying to do is pass the PFObject for the selected row to a PFObject in DetailsForWatch. My setup for DFW is:
.h
@interface DetailsForWatch : WKInterfaceController {
}
@property (nonatomic, retain) IBOutlet WKInterfaceLabel *detailsLabel;
@property (nonatomic, retain) PFObject *finalObject;
@end
.m
- (void)awakeWithContext:(id)context {
[super awakeWithContext:context];
NSString *details = self.finalObject [@"Request"];
[self.detailsLabel setText:details];
NSLog(@"%@", self.finalObject);
// Configure interface objects here.
}
In IC, for .h I have:
@class DetailsForWatch;
@interface InterfaceController : WKInterfaceController {
DetailsForWatch *_theDetails;
}
@property (retain) DetailsForWatch *theDetails;
@end
In the .m I have:
@synthesize theDetails = _theDetails;
for didSelectRowAtIndex, I have:
_theObject = _theObjective[rowIndex];
self.theDetails = [[DetailsForWatch alloc] init];
_theDetails.finalObject = _theObject;
I set up the DFW as a Push selection from the Group on IC. When I select a row in the IC, it pushes a blank screen, and the NSLog shows that the PFObject named finalObject is (null). What am I doing wrong that it is not passing on PFObject properly?