简体   繁体   中英

UITableView cell selected not loading another View

Hey everbody, im getting a curious problem here. Im trying to make my table push another view, called 'productviewcontroller'.

Im importing both 'productviewcontroller' and 'myappviewcontroller' on header.

#import "SearchViewController.h"
#import "MyAppViewController.h"
#import "TBXML.h"
#import "ProductViewController.h"

And im setting my table to push the another view.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    ProductViewController *productViewController = [[ProductViewController alloc] initWithNibName:@"ProductViewController" bundle:[NSBundle mainBundle]];

    [self.navigationController pushViewController:productViewController animated:YES];
    [productViewController release];

    NSLog(@"Test.");
}

When i selects the cell, it gives me the message 'test'. But dont push the another view. Im setting the navigationController on app delegate.

What im doing wrong?

Thanks!

It looks right. Does the ProductView nib include a navigation controller?

在要从中推送“ ProductControllerView”并将其与IBOutlet绑定的视图中使用导航控制器,便可以推送该视图。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM