开发者

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 pushViewCon开发者_如何学Gotroller: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?


Use your navigation controller in this view from which you want to push "ProductControllerView" and bind it with IBOutlet and you are able to push the view..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜