Am I executing TTLauncher correctly?

I played with the TTCatalog example, just tried adding a URL with the URL displayed in appdelegate:

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

For some reason, it does nothing when you click on it.

+3
source share
2 answers

In case you have not yet been able to determine this option, I assume that you are not doing anything in launcherView: didselectitem:

Just create a TTNavigator object inside the method, and then call openURLAction. for instance

(void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item 
{
    TTNavigator *navigator = [TTNavigator navigator];
    [navigator openURLAction:[TTURLAction actionWithURLPath:item.URL]];
}
+7
source

If Robert Lowry's answer does not work, check the delegate in the view.

TTLauncherView.delegate TTLauncherViewDelegate. ( launcherView:didSelectItem: .)

+2

Source: https://habr.com/ru/post/1747221/


All Articles