Last active
December 11, 2015 16:09
-
-
Save grantmiller/4625869 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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