ios 将消息传递给模态视图
我有一个视图 [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是我的接收者, 评论部分是有效的,用于发送,
我该如何发送消息?基本抱歉
非常感谢!
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];*/
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发送至 dany_dev
tnx to dany_dev