Iphone TTTableView返回TTTableViewController后隐藏

Iphone TTTableView返回TTTableViewController后隐藏,iphone,objective-c,uiwebview,three20,Iphone,Objective C,Uiwebview,Three20,我正在编写一个基于Three20框架的应用程序,我似乎遇到了一些问题 我使用TTTableViewController从端点加载数据并显示标题列表,单击该列表可以显示一个新的UIViewController,其中包含一个显示URL(从JSON数据获取)的UIWebView。但是,当我点击UIViewController中的“后退”按钮时,视图会弹回来……但是UIWebView不会消失(它是用[autorelease]定义的)。它位于TTTableView应该位于的顶部 我在SearchResul

我正在编写一个基于Three20框架的应用程序,我似乎遇到了一些问题

我使用TTTableViewController从端点加载数据并显示标题列表,单击该列表可以显示一个新的UIViewController,其中包含一个显示URL(从JSON数据获取)的UIWebView。但是,当我点击UIViewController中的“后退”按钮时,视图会弹回来……但是UIWebView不会消失(它是用[autorelease]定义的)。它位于TTTableView应该位于的顶部

我在SearchResultViewController中用于初始化UIWebView的代码非常简单:

- (void)loadView {
    ....
    // Add the UIWebView
    webView = [[[UIWebView alloc] initWithFrame:CGRectMake(0.f, TT_ROW_HEIGHT + 20, TTApplicationFrame().size.width, TTApplicationFrame().size.height - TT_ROW_HEIGHT - toolbar.frame.size.height)] autorelease];
    // Load the URL
    address = self.productIdentifier;
    NSURL *url = [NSURL URLWithString:address];
    NSLog(@"%@",url);
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    [webView loadRequest:requestObj];

    [self.navigationController.view addSubview:webView];
    ....
}
而SearchResultViewController的推送也同样简单:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Search Again" style:UIBarButtonItemStylePlain target:self action:@selector(goBack)];
    self.navigationItem.backBarButtonItem = backButton;
    [backButton release];

    SearchResultViewController *srvc = [[SearchResultViewController alloc] init];
    srvc.productIdentifier = [[[(id<SearchResultsModel>)self.model results] objectAtIndex:indexPath.row] url];
    srvc.title              = [[[(id<SearchResultsModel>)self.model results] objectAtIndex:indexPath.row] title]; 
    srvc.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:srvc animated: YES];
}
-(void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(nsindepath*)indepath
{
UIBarButtonItem*backButton=[[UIBarButtonItem alloc]initWithTitle:@“再次搜索”样式:UIBarButtonItemStylePlain目标:自我操作:@selector(goBack)];
self.navigationItem.backBarButtonItem=backButton;
[后按钮释放];
SearchResultViewController*srvc=[[SearchResultViewController alloc]init];
srvc.productIdentifier=[[(id)self.model结果]objectAtIndex:indexPath.row]url];
srvc.title=[[(id)self.model结果]objectAtIndex:indexPath.row]title];
srvc.hidesBottomBarWhenPushed=是;
[self.navigationController-pushViewController:srvc-animated:YES];
}

找到了答案;愚蠢可笑的错误。我在整个navigationController中添加了UIWebView,而不是我需要的视图。哼