Demo code three20 TTNavigator triggers a compiler warning

I am working on a similar project after a demo application TTNavigatorand fell from the first hurdle.

I duplicated the initial section as shown here:

- (void)applicationDidFinishLaunching:(UIApplication *)application {
     TTNavigator* navigator = [TTNavigator navigator];
     navigator.persistenceMode = TTNavigatorPersistenceModeAll;
     navigator.window = [[[UIWindow alloc] initWithFrame:TTScreenBounds()] autorelease];
     TTURLMap* map = navigator.URLMap;
     [map from:@"*" toViewController:[TTWebController class]];
     [map from:@"tt://tabBar" toSharedViewController:[TabBarController class]];
     if (![navigator restoreViewControllers]) {
      [navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://tabBar"]];
     }
}

And I turned it on TabBarController, but I get a compiler warning saying that the controller may not respond to setTabURLs.

I have a copied controller and can't see where the problem is.

- (void)viewDidLoad {
  [self setTabURLs:[NSArray arrayWithObjects:@"tt://menu/1",
                                             @"tt://menu/2",
                                             @"tt://menu/3",
                                             @"tt://menu/4",
                                             @"tt://menu/5",
                                             nil]];

}

+3
source share
2 answers

Got it!

make sure this line is included in the Prefix.pch file :-)

 #import <Three20/Three20+Additions.h>

or include in the source code!

+2
source

referenced by OP:

#import <Three20/Three20+Additions.h>

(setTabUrls: UIToolbarController)

+2

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


All Articles