ios将消息传递给模态视图

时间:2011-07-04 15:37:44

标签: ios message nib modalviewcontroller

我有一个调用其他视图[xib]的视图[xib], 当我转到第二个视图时,一个值被发送到第二个视图.m

  

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 个答案:

答案 0 :(得分: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];