how to release controller after jump to other page or remove view title bar
in my code I call tab bar controller like this:
[[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:@"tt://tabBar"]];
For the first page which tab bar called like this:
- (id)init{
if (self = [super init]) {
self.title = @"app";
开发者_运维百科UIImage* image = [UIImage imageNamed:@"tab.png"];
self.tabBarItem = [[[UITabBarItem alloc] initWithTitle:self.title image:image tag:0] autorelease];
self.variableHeightRows = YES;
id<TTTableViewDataSource> ds = [MainPageDataSource dataSourceWithItems:nil];
ds.model = CreateTabModelWithCurrentSettings();
self.dataSource = ds;
}
return self;}
-(void)loadView{
self.view = [[[UIView alloc] initWithFrame:TTApplicationFrame()] autorelease];
self.tableView = [[[UITableView alloc] initWithFrame:TTApplicationFrame() style:UITableViewStylePlain] autorelease];
self.tableView.rowHeight = 80.f;
self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:self.tableView];}
As shown above.
how to remove the "back" title?
how to remove both of title?
Actually I found that the back navigate bar is previous login page's, so is there any way to release the previous login page after the tab bar controller has been called
Take a look on this tutorial. It explains how to hide the tab bar when you push a login view. http://three20.info/article/2010-11-10-Hiding-The-iphone-Tab-Bar-With-TTNavigator
Note that it makes more sense to show your tab bar main controller, and push the login view in case the user isn't logged in. This way you can release the login view and come back to the main tab bar view.
Also, if you have issues with duplicated UINavigationBar
bars, you should use the [TTURLMap from:(NSString*)URL toModalViewController:(id)target]
function, which present controllers that already has UINavigationBar
`
精彩评论