Databases Reference
In-Depth Information
Figure 15—Linking the Import menu item
When the user taps Mail Recipe, the
switch
statement calls our
-mailRecipe
method.
- (
void
)mailRecipe
{
PPRExportOperation *operation = nil;
operation = [[PPRExportOperation alloc] initWithRecipe:[self recipeMO]];
[operation setCompletionBlock:^(NSData *data, NSError *error) {
ZAssert(data || !error, @
"Error: %@\n%@"
, [error localizedDescription],
[error userInfo]);
//Mail the data to a friend
}];
[[NSOperationQueue mainQueue] addOperation:operation];
}
Search WWH ::
Custom Search