如何从委托获取值并重新加载视图
我正在开发一个 iPad 应用程序,这是我第一次充分利用弹出窗口视图。我使用弹出窗口视图作为带有类别的菜单,并且只有 1 个带有视频的屏幕。当用户选择一个类别时,“FeaturedViewController”必须使用新的 playlistId 重新加载视图。
当用户选择一个类别时,很容易做到: double playlistId = [[playlists.items objectAtIndex:indexPath.row] playlistId];
但是如何在我的FeaturedViewController中获取该playlistId并重新加载视图?
I'm developing an iPad app, and it's the first time I put the popover view to good use. I'm using the popover view as a menu with categories, and only have 1 screen with video's. When the user selects a category, the 'FeaturedViewController' has to reload the view with the new playlistId.
When a user selects a category, it's easy to do: double playlistId = [[playlists.items objectAtIndex:indexPath.row] playlistId];
But how do I get that playlistId in my FeaturedViewController and reload the view?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在您的FeaturedViewController.m
EDITED
中或者您可以在FeaturedViewController中定义一个属性并在此VC中赋值,例如:
希望它能给您提供访问委托变量的想法
in your FeaturedViewController.m
EDITED
Or you can define a property in FeaturedViewController and assign value in this VC like :
hope it gives you idea to access variable of delegate
看:
Key NSlogs 正确,但我根本没有从 FeaturedViewController 中的 nextView.PLID 得到响应。
Look:
The Key NSlogs correctly, but i dont get a response from nextView.PLID in the FeaturedViewController at all.