3

I was playing around with the TTCatalog example, just tried adding a url with a url mapped in the appdelegate:

  [[[TTLauncherItem alloc] initWithTitle:@"Button 1"
                           image:@"bundle://Icon.png"
                           URL:@"tt://photoTest1" canDelete:YES] autorelease],

For some reason, it's not doing anything at all when you click on it.

Frank
  • 3,073
  • 5
  • 40
  • 67

2 Answers2

7

In case you haven't been able to figure this one out yet, my guess is that you are not doing anything in launcherView: didselectitem:

Just create a TTNavigator object inside the method and then call openURLAction. For example

(void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item 
{
    TTNavigator *navigator = [TTNavigator navigator];
    [navigator openURLAction:[TTURLAction actionWithURLPath:item.URL]];
}
sth
  • 222,467
  • 53
  • 283
  • 367
2

If Robert Lowery's answer doesn't work, check your launcher view delegate.

The TTLauncherView.delegate property should be pointing to your view controller and should implement the TTLauncherViewDelegate protocol. (Otherwise launcherView:didSelectItem: will never get called.)

zekel
  • 9,227
  • 10
  • 65
  • 96