将字典与 didSelectRowAtIndexPath 一起使用
我试图从选定的单元格中获取路径名称,并将其传递到 didSelectRowAtIndexPath 中的下一个视图。我该怎么办呢? http://pastebin.com/bgXNfjie
I am trying to get the trail name from the selected cell and pass it on to the next view in didSelectRowAtIndexPath. How would I go about this?
http://pastebin.com/bgXNfjie
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解正确的话,那么这并不是什么大事。您只需在 TrailViewController 中创建一个属性来保存您的值并像这样分配它:
您可能希望将完整的 NSDictionary 分配给 TrailViewController 的属性,而不仅仅是名称,但这取决于您。我希望我能帮忙...
if I understood you correctly, then this is not such a big thing. You just have to make a property in TrailViewController to hold your value and assign it like this:
Instead of just the name, you'll probably want to assign the complete NSDictionary to a property of the TrailViewController,but thats up to you. I hope I could help...