我正在努力研究three20如何运作。它通过提供不同的颜色,在大胆,斜体和超链接的情况下工作正常。我在appdelegate中给出了代码,以便控件转到我自己的类(例如:WebViewController)。
TTNavigator* navigator = [TTNavigator navigator];
navigator.supportsShakeToReload = YES;
navigator.persistenceMode = TTNavigatorPersistenceModeAll;
TTURLMap* map = navigator.URLMap;
[map from:@"*" toViewController:[WebViewController class]];
我没有在自定义类中编写任何代码,只在viewDidLoad中编写NSLog来查找控件是否到达那里。它成功进入WebViewController。但问题是顶部有一个额外的导航栏,而我当前存在TTStyledTextLabel的窗口无用。这是什么问题。我花了一整天的时间。请有人帮助我。
答案 0 :(得分:0)
您应该打开并检查包中包含的示例项目。
以下是您在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]];
他们比这更复杂,更强大,通过挖掘来学习。