views:

27

answers:

1

I am trying to study how the three20 works. It is working fine in case of bold, italics and hyperlink by giving a different color. I have given code in the appdelegate for the control to go to my own class(Eg: WebViewController).

TTNavigator* navigator = [TTNavigator navigator];
navigator.supportsShakeToReload = YES;
navigator.persistenceMode = TTNavigatorPersistenceModeAll;

TTURLMap* map = navigator.URLMap;
[map from:@"*" toViewController:[WebViewController class]];

I have not written any code in my custom class and just a NSLog in viewDidLoad to find whether the control arrives there. And it is successfully going to WebViewController. But the problem is an extra navigational bar comes at the top and my current window in which the TTStyledTextLabel is present goes useless. What is this problem. I spent a whole day on this. Please someone help me out.

A: 

You should open and inspect the sample projects that are included in the bundle.

Here is what you find in TTCatalog:

 TTURLMap* map = navigator.URLMap;
 [map from:@"*" toViewController:[TTWebController class]];
 [map from:@"tt://catalog" toViewController:[CatalogController class]];
 [map from:@"tt://photoTest1" toViewController:[PhotoTest1Controller class]];
 [map from:@"tt://photoTest2" toViewController:[PhotoTest2Controller class]];
 [map from:@"tt://imageTest1" toViewController:[ImageTest1Controller class]];
 [map from:@"tt://tableTest" toViewController:[TableTestController class]];
 [map from:@"tt://tableItemTest" toViewController:[TableItemTestController class]];
 [map from:@"tt://tableControlsTest" toViewController:[TableControlsTestController class]];
 [map from:@"tt://styledTextTableTest" toViewController:[StyledTextTableTestController class]];
 [map from:@"tt://tableWithShadow" toViewController:[TableWithShadowController class]];
 [map from:@"tt://composerTest" toViewController:[MessageTestController class]];
 [map from:@"tt://searchTest" toViewController:[SearchTestController class]];
 [map from:@"tt://activityTest" toViewController:[ActivityTestController class]];
 [map from:@"tt://styleTest" toViewController:[StyleTestController class]];
 [map from:@"tt://styledTextTest" toViewController:[StyledTextTestController class]];
 [map from:@"tt://buttonTest" toViewController:[ButtonTestController class]];
 [map from:@"tt://tabBarTest" toViewController:[TabBarTestController class]];
 [map from:@"tt://youTubeTest" toViewController:[YouTubeTestController class]];
 [map from:@"tt://imageTest2" toViewController:[TableImageTestController class]];
 [map from:@"tt://scrollViewTest" toViewController:[ScrollViewTestController class]];
 [map from:@"tt://launcherTest" toViewController:[LauncherViewTestController class]];

They get more complicated and powerful than this, learn by digging in.

coneybeare