开发者

ios passing message to modal view

I have a view [xib] that calls other view [xib], when I go to the second view, a value gets send to the second view .m

initWithNibName

but when I call that second view as a modal view, my message is not sent,

how can I do it?

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];*/
开发者_如何学Go

Please note that string1 is my sender message, and string2 is my receiver, The commented portion is the one that works, for sending,

how can I send the message? basic sorry

thanks a lot!


tnx to 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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜