سؤال

When I read the sample code for Launching and killing your Pebble app:

[self.connectedWatch appMessagesLaunch:^(PBWatch *watch, NSError *error) {
    if (!error) {
        NSLog(@"Successfully launched app.");
    }
    else {
        NSLog(@"Error launching app - Error: %@", error);
    }
}
];

What that mean Self? How can I create something like self in this code because I give the error the Property 'connectedWatch' not found on object of type.

هل كانت مفيدة؟

المحلول

Just look in the .h file and add this property between @interface and @end, like so:

@property (strong) PBWatch *connectedWatch;

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top