Domanda

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.

È stato utile?

Soluzione

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

@property (strong) PBWatch *connectedWatch;

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top