请参考我的这篇文章- how to change TTNavigator (for a web url) bottom bar color?
现在,我必须对同一个控制器禁用“在Safari中打开”选项。请给我一个建议。我还不能找到使用样式来做到这一点。我知道这是可能的,因为我在一些应用程序上看到了这个选项。
请帮帮我。
发布于 2011-10-19 20:57:20
默认情况下,TTNavigator会将任何不匹配的URL转发给TTWebController。
因此,如果您想要更改web视图,则必须将TTWebController子类添加到您自己的类中,并在应用程序委托中添加映射:
要删除在safar中打开操作按钮,请尝试将此函数添加到您的子类自定义TTWebController中:
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)loadView {
[super loadView];
TT_RELEASE_SAFELY(_toolbar);
_toolbar = [[UIToolbar alloc] initWithFrame:
CGRectMake(0, self.view.height - TTToolbarHeight(),
self.view.width, TTToolbarHeight())];
_toolbar.autoresizingMask =
UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth;
_toolbar.tintColor = TTSTYLEVAR(toolbarTintColor);
_toolbar.items = [NSArray arrayWithObjects:
_backButton,
space,
_forwardButton,
space,
_refreshButton,
nil];
[self.view addSubview:_toolbar];}
并在您的应用程序委托中包含覆盖所有映射规则:
[map from:@"*" toViewController:[CustomWebController class]];https://stackoverflow.com/questions/7723502
复制相似问题