Iphone 当我单击每一行时,如何设置NavigationItem上的标题?

Iphone 当我单击每一行时,如何设置NavigationItem上的标题?,iphone,objective-c,ios,Iphone,Objective C,Ios,朋友们好,我是TableView的新手……我需要帮助……请 我必须在导航栏上设置标题,当我点击每一行时,我应该得到与导航栏上的行相同的名称。。。。。。朋友们,我的桌子上有23排,所以请建议我解决我的问题 谢谢®a试试self.title=name of row;[self.view setNeedsDisplay]在表格视图中:didSelectRowForIndexPath:尝试self.title=name of row;[self.view setNeedsDisplay]在tabl

朋友们好,我是TableView的新手……我需要帮助……请

我必须在导航栏上设置标题,当我点击每一行时,我应该得到与导航栏上的行相同的名称。。。。。。朋友们,我的桌子上有23排,所以请建议我解决我的问题


谢谢®a

试试
self.title=name of row;[self.view setNeedsDisplay]
表格视图中:didSelectRowForIndexPath:

尝试
self.title=name of row;[self.view setNeedsDisplay]
tableView:didSelectRowForIndexPath:
中在
tableView:didSelectRowForIndexPath:
中,编写以下代码:

self.title = [NSString stringWithFormat:@"Cell%d",indexPath.row];

tableView:didSelectRowForIndexPath:
中,编写以下代码:

self.title = [NSString stringWithFormat:@"Cell%d",indexPath.row];

您好,alex您可以在其上设置自定义后退按钮btn=[UIButton button WithType:UIButtonTypeCustom];btn.frame=CGRectMake(280,0,32,31);[btn addTarget:self action:@selector(back:)forControlEvents:UIControlEventTouchUpInside];[btn setImage:[UIImage ImageName:@“back_btn.png”]用于状态:UIControlStateNormal];self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithCustomView:btn];您好,alex您可以在其上设置自定义后退按钮btn=[UIButton button WithType:UIButtonTypeCustom];btn.frame=CGRectMake(280,0,32,31);[btn addTarget:self action:@selector(back:)forControlEvents:UIControlEventTouchUpInside];[btn setImage:[UIImage ImageName:@“back_btn.png”]用于状态:UIControlStateNormal];self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithCustomView:btn];