Hi, i read in this forum in other tread over this issue but not find the answer rigth.. so.. any can help me?
i have a application what handle a tab bar whit 5 buttons and one button=1view, this works fine.. this views have a data array to input to tableview.. this works fine.. but the problem is when i touch a row in tableview, this action will send me to other view whit data detail.. and this not happend. this the code.
delegate.h
#import <UIKit/UIKit.h>
@class negociosViewController;
@interface iPublicarAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
UITabBarController *tabBarController;
negociosViewController *viewController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) negociosViewController *viewController;
@end
---------------
delegate.m
#import "delegateAppDelegate.h"
#import "categoriasViewController.h"
#import "negociosViewController.h"
#import "sitiosViewController.h"
#import "favoritosViewController.h"
#import "randomViewController.h"
@implementation delegateAppDelegate
@synthesize window, viewController;
- (void)applicationDidFinishLaunching (UIApplication *)application {
UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:viewController] autorelease];
[window addSubview:navController.view];
tabBarController = [[UITabBarController alloc] init];
categoriasViewController *catViewController = [[categoriasViewController alloc] initWithNibName:@"categoriasView" bundle:nil];
catViewController.title = @"Categorias";
negociosViewController *negViewController = [[negociosViewController alloc] initWithNibName:@"negociosView" bundle:nil];
negViewController.title = @"Negocios";
sitiosViewController *sitViewController = [[sitiosViewController alloc] initWithNibName:@"sitiosView" bundle:nil];
sitViewController.title = @"Sitios";
favoritosViewController *favViewController = [[favoritosViewController alloc] initWithNibName:@"favoritosView" bundle:nil];
favViewController.title = @"Favoritos";
randomViewController *ranViewController = [[randomViewController alloc] initWithNibName:@"randomView" bundle:nil];
ranViewController.title = @"Random";
tabBarController.viewControllers = [NSArray arrayWithObjects:catViewController, negViewController, sitViewController, favViewController, ranViewController, nil];
[catViewController release];
[negViewController release];
[sitViewController release];
[favViewController release];
[ranViewController release];
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
}
- (void)dealloc {
[tabBarController release];
[window release];
[super dealloc];
}
@end
VIEW WHIT TABLEVIEW
categorias.h
#import <UIKit/UIKit.h>
@interface categoriasViewController : UIViewController {
IBOutlet UITableView *tblSimpleTable;
NSArray *arryData;
}
@end
categorias.m
#import "categoriasViewController.h"
#import "nextCatViewController.h"
@implementation categoriasViewController
- (void)viewDidLoad {
arryData = [[NSArray alloc] initWithObjects:@"iPhone",@"iPod",@"MacBook",@"Mac Book Pro",nil];
[super viewDidLoad];
}
- (NSInteger)numberOfSectionsInTableView (UITableView *)tableView {
return 1;
}
- (void)dealloc {
[super dealloc];
}
// Customize the number of rows in the table view.
- (NSInteger)tableView (UITableView *)tableView numberOfRowsInSection(NSInteger)section {
return [arryData count];
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView

UITableView *)tableView cellForRowAtIndexPath

NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
// Set up the cell...
UIImage *image = [UIImage imageNamed:@"icon.png"];
cell.image = image;
cell.text = [arryData objectAtIndex:indexPath.row];
return cell;
}
- (void)tableView (UITableView *)tableView didSelectRowAtIndexPath

NSIndexPath *)indexPath {
nextCatViewController *nextController = [[nextCatViewController alloc] initWithNibName:@"nextCatView" bundle:nil];
[self.navigationController pushViewController:nextController animated:YES];
[nextController changeProductText:[arryData objectAtIndex:indexPath.row]];
}
@end
VIEW DETAIL DATA -> NAVIGATION ACTION
.h
#import <UIKit/UIKit.h>
@interface nextCatViewController : UIViewController {
IBOutlet UILabel *lblProductTxt;
}
- (IBAction) changeProductText

NSString *)str;
@end
.m
#import "nextCatViewController.h"
@implementation nextCatViewController
- (void)dealloc {
[super dealloc];
}
- (IBAction) changeProductText (NSString *)str{
lblProductTxt.text = str;
}
@end
THANKS FOR HELP.