开发者

how to release controller after jump to other page or remove view title bar

开发者 https://www.devze.com 2023-03-19 02:25 出处:网络
in my code I call tab bar controller like this: [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:@\"tt://tabBar\"]];

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];}

how to release controller after jump to other page or remove view title bar

As shown above.

  1. how to remove the "back" title?

  2. how to remove both of title?

  3. 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 `

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号