在视图控制器之间传递值
Objective C - iPhone应用程序
我有2个以编程方式实例化的UINavigationControllers
在控制器1中我推这个视图
-(IBAction) showStartDateCalendar
{
ModalSetDateController *setStartDate = [[ModalSetDateController alloc] init];
[self.navigationController pushViewController: setStartDate animated:YES];
[setStartDate release];
};
为了推回它我计划做这样的事情:
-(IBAction) PopMyViewControllerBack;
{
[self.navigationController popViewControllerAnimated: YES];
}
但是我如何才能获得ModalSetDateController上日期选择器的值 这是处理添加 UIPickerview 的最佳方法吗?我什至不想让 UINavigationController 来做这件事。 感谢您的帮助!
Objective C - iPhone Application
I have 2 programatically instantiated UINavigationControllers
In controller 1 I push this View
-(IBAction) showStartDateCalendar
{
ModalSetDateController *setStartDate = [[ModalSetDateController alloc] init];
[self.navigationController pushViewController: setStartDate animated:YES];
[setStartDate release];
};
To push it back I was planning on doing something like this:
-(IBAction) PopMyViewControllerBack;
{
[self.navigationController popViewControllerAnimated: YES];
}
But how would I be able to get the value of the datepicker on ModalSetDateController
Is this the best way to handle adding a UIPickerview. I would prefer to not even have a UINavigationController do it.
Thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用:
发送者将是 ModalSetDateController 的实例。
Use:
and sender will be an instance of ModalSetDateController.