Skip to content

Instantly share code, notes, and snippets.

@grantmiller
Last active December 11, 2015 16:09
Show Gist options
  • Save grantmiller/4625869 to your computer and use it in GitHub Desktop.
Save grantmiller/4625869 to your computer and use it in GitHub Desktop.
- (id)lookIOManager:(LIOLookIOManager *)aManager linkViewForURL:(NSURL *)aURL
{
if ([[aURL host] isEqualToString:@"product"])
{
NSString *numString = [aURL lastPathComponent];
if ([numString length])
{
int productId = [numString intValue];
if (productId < 6 && productId >= 0)
{
NSString *productName = nil;
switch (productId)
{
case 0: productName = @"Product Zero"; break;
case 1: productName = @"Product One"; break;
case 2: productName = @"Product Two"; break;
case 3: productName = @"Product Three"; break;
case 4: productName = @"Product Four"; break;
case 5: productName = @"Product Five"; break;
}
return productName;
}
}
}
return nil;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment