我有多个详细视图,当我单击 rootViewController 中的选择第二行时,我删除了详细视图并从 appDelegate 添加了一个新视图。当我这样做时,我无法将值从 rootView 发送到 newDetailView。这就是我在我的 appdelegate 中所做的
[splitViewController.view removeFromSuperview];
arcObj = [[Architecture alloc] init];
UINavigationController *detailNav=[[UINavigationController alloc]initWithRootViewController:arcObj];
[arcObj release];
splitViewController.viewControllers=[NSArray arrayWithObjects:rootViewController,detailNav,nil];
splitViewController.delegate=arcObj;
在 rootVeiwController
NewdetailViewController.detailItem = @"gettingin";
在我的 newDetailView
- (void)setDetailItem:(id)newDetailItem {
if (detailItem != newDetailItem) {
[detailItem release];
detailItem = [newDetailItem retain];
}}
它没有调用该方法
- (void)setDetailItem:(id)newDetailItem
有什么帮助吗???