2011-07-04 91 views
1

我有一個調用其他視圖中查看[廈門國際銀行] [廈門國際銀行], 當我去到第二個觀點,一個值將被髮送到第二視圖的.mIOS傳遞消息模式視圖

initWithNibName

但是當我打電話,作爲一個模態的視圖第二種觀點,是不是把我的消息,

我該怎麼辦呢?

Contacts *info = [XlistArray objectAtIndex:indexPath.row]; 

     string1 = info.c_name; 
     editContactViewController *mensaje =[editContactViewController alloc]; 
     mensaje.string2 = string1; 

     editContactViewController *vistaEdit = [[editContactViewController alloc] initWithNibName:nil bundle:nil]; 

     vistaEdit.modalPresentationStyle = UIModalPresentationFormSheet; 



     [self presentModalViewController:vistaEdit animated:YES]; 



     /* 
     Contacts *info = [XlistArray objectAtIndex:indexPath.row]; 

     string1 = info.c_name; 

     editContactViewController *mensaje =[editContactViewController alloc]; 
     mensaje.string2 = string1; 


     editContact = [[editContactViewController alloc] initWithNibName:@"editContactViewController" bundle:nil]; 

     [self.view addSubview:mensaje.view]; 

     [UIView commitAnimations]; 

     [tableView deselectRowAtIndexPath:indexPath animated:YES];*/ 

請注意,string1爲我發送消息,string2爲我的接收器, 註釋的部分是一個工程,用於發送,

我怎麼能發送消息?基本對不起

非常感謝!

回答

1

TNX到dany_dev

Contacts *info = [XlistArray objectAtIndex:indexPath.row]; 

    string1 = info.c_name; 

    editContactViewController *vistaEdit = [[editContactViewController alloc] initWithNibName:nil bundle:nil]; 

    vistaEdit.string2 = string1; 

    vistaEdit.modalPresentationStyle = UIModalPresentationFormSheet; 


    [self presentModalViewController:vistaEdit animated:YES];