Figured it out myself, for those who need it.
Figured it out myself, for those who need it: First (passing "subURLs" in your navigator map) navigating to an URL with @"tt://photos/firstphoto" is possible, you can fetch the "firstphoto" like this: //Prepare your Navigator Map like this map from:@"tt://photos/(initWithNumber:)" toViewController:PhotoVC class; In your PhotoVC you can access this Number: -(void) initWithNumber: (NSString*)number { NSLog(@"%@",number); } calling your View Controller with this url would look: PhotoVC* controller = PhotoVC alloc initWithNumber:@"1"; navigationController pushViewController:controller animated:YES; controller release; Second (passing objects in an TTTableViewController) its a bit tricky, but you don't have to Subclass anything. First, nil the URL in the TableItem TTTableLink itemWithText:@"TTTableLink" URL:nil in your TTTableViewController write down this method - (void)didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath { TTURLAction *urlAction = TTURLAction alloc initWithURLPath:@"tt://photos" autorelease; urlAction. Query = NSDictionary dictionaryWithObject:@"firstphoto" forKey:@"photo"; urlAction.
Animated = YES; TTNavigator navigator openURLAction:urlAction; } now in your your PhotoVC you need something like this - (id)initWithNavigatorURL:(NSURL*)URL query:(NSDictionary*)query { if (self = super init) { NSLog(@"%@",query); } return self; } and you are done ;).
Thanks for this! – Paul Shapiro Dec 31 '10 at 8:36 Awesome! I wasn't passing nil in ` TTTableLink itemWithText:@"TTTableLink" URL:nil`.
It's stupid that you have to do that, since now I have to manually tell the cell to display the right arrow. – Philip Walton May 17 at 19:03.
I was trying to implement choise's answer, learned a lot, and eventually had to get the callouts showing up and keep the implementation with many urls simple, so here's what I did. Keep URL in the TableItem, Use this code in the TTTableViewController subclass. - (void)didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath { NSLog(@"Its url is %@", object URL); TTURLAction *urlAction = TTURLAction alloc initWithURLPath:(NSString *)object URL autorelease; urlAction.
Query = NSDictionary dictionaryWithObject:self. User forKey:@"user"; urlAction. Animated = YES; TTNavigator navigator openURLAction:urlAction; } - (BOOL)shouldOpenURL:(NSString*)URL { return NO; } That "shouldOpenURL:" was discovered looking through TTTableViewController, I tried it out, and it worked.
Now the table view is not opening a duplicate view, and there are callouts! Thanks choise!
1 Yes, I also just discovered this the hard way. Overriding shouldOpenURL: to return NO is a much better solution than passing nil to the URL parameter of the TTLinkedItem. That way you get to keep the right arrows in the table view cells.
– Philip Walton May 17 at 19:12.
Although choice's answer works for multiple params when you are creating the TTURLAction in code it is not very useful when you want to embed links to view controllers in your TTStyledLabel. One solution to that is to use multiple params in a single string. LabelName if you want the code to parse such urls and get the params please feel free to send me a message and I will send you my parser classes.(or you can build your own with NSScanner!) Also don't forget to escape the &s otherwise TTStyledLabel would not like it!
Foo=bar&lorem=ipsum – choise May 17 at 21:29 you are right...i just found out that app://view2/-param1-param2-param3- doesn't really work...TTNavigator converts it into app://view2/-param1-param2-param3- since it does not look like a URL. I will edit this now. – samyzee May 17 at 22:28.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.