Search code examples
iphonesdkthree20launcher

TTLauncherView url to view controllers? - iPhone SDK


Hey, I would like to know how to link a view controller to a item in the TTLauncher?

[self launcherItemWithTitle:@"Apple" image:@"bundle://safari_logo.png" URL://What to write here?]

Solution

  • You link it to a URL in your TTURLMap that is linked to the view controller you want. So you'd call for example:

    [self launcherItemWithTitle:@"Apple" image:@"bundle://safari_logo.png" URL:@"tt://apple"]
    

    and then when you declare your TTURLMAP:

    TTNavigator *navigator = [TTNavigator navigator];
    [navigator.URLMap from:@"tt://apple" toViewController:[YourViewController class]];
    

    where YourViewController is the one you want to launch

    Hope this helps