我无法从rootViewController中删除detailView中的subView

时间:2012-04-25 05:55:17

标签: iphone ios ipad uisplitviewcontroller

我有多个详细视图,当我点击rootViewController中的第二行时,我删除了detailView并从appDelegate添加了一个newView。当我这样做时,我无法从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

任何帮助???

1 个答案:

答案 0 :(得分:0)

您需要使用 -

[NewdetailViewControllerObject setDetailItem:@"gettingin"];