Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 如何获得标签';下一个视图上的文本';什么是导航栏?_Objective C_Iphone - Fatal编程技术网

Objective c 如何获得标签';下一个视图上的文本';什么是导航栏?

Objective c 如何获得标签';下一个视图上的文本';什么是导航栏?,objective-c,iphone,Objective C,Iphone,我有一个自定义单元格,其中有一个标签。现在我想在下一个视图的导航栏中显示所选单元格标签上的文本?我怎么得到它 //in the main controller didSelectRowAtIndexPath method: MyViewController *controller = [[MyViewController alloc] initWithTitle:label.text]; //in the 2nd controller: -(id)initWithTitle:(NSStri

我有一个自定义单元格,其中有一个标签。现在我想在下一个视图的导航栏中显示所选单元格标签上的文本?我怎么得到它

//in the main controller didSelectRowAtIndexPath method:

MyViewController *controller = [[MyViewController alloc] initWithTitle:label.text];

//in the 2nd controller:

-(id)initWithTitle:(NSString *)theTitle {
    if(![super init]) return nil;
    self.title = theTitle;
}