MonoTouch:故事板 - 手动转场?
iPhone/iPad 开发新手在这里...
我正在使用 MonoTouch 创建通用的 iPad/iPhone 故事板应用程序。在主视图控制器 (RootViewController) 中,默认自动生成的行为是一个包含单个单元格“Detail”的表格,它将您硬连线到下一个目标 (DetailViewController)。
我想更改此 RootViewController 以显示我扩展 UIViewController (LoginView) 的登录控件。我已经成功地将 LoginView 放入 RootViewController 中,但不知道如何使其“segue”到 DetailViewController。在观察 iPad 应用程序的工作原理后,两者之间没有任何连续性(我可以看到),我的做法是否错误?
总结一下:如何通过前面的登录屏幕增强此故事板应用程序,在 iPad 和 iPhone 变体之间重用其内容/xib?
如果这有点不清楚和混乱,我们深表歉意......
iPhone/iPad dev newb here...
I am using MonoTouch to create a universal iPad/iPhone storyboard app. In the primary view controller (RootViewController) the default auto-generated behavior is a table with a single cell "Detail" in it, which hardwires you to the next destination (DetailViewController).
I'd like to change this RootViewController to instead show a login control I've made extending UIViewController (LoginView). I have had some success putting the LoginView inside the RootViewController, but can't figure out how to make it 'segue' to DetailViewController. And upon watching how the iPad app works, where there is no segue (that I can see) between the two, am I going about this wrong?
To summarize: How do I enhance this storyboard app with a preceding login screen, reusing its contents/xib between the iPad and iPhone variant?
Apologies if this is a bit unclear and muddled.......
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有在 Monotouch 中尝试过故事板应用程序,但我确实花了很多时间为我的应用程序找到登录屏幕的最佳方法。我最终所做的是将登录屏幕呈现为模态视图,这也适用于您的情况。用户成功登录后,我们就会推送下一个适当的视图。
因此,如果情节提要视图控制器自动将您推入详细信息视图,您可以通过详细信息视图的 DidLoad 或 DidAppear 方法将登录对话框显示为模式对话框。
I have not tried a storyboard app in Monotouch yet, but I did spend a lot of time working out the best approach for a login screen for my application. What I ended up doing, which could work in your situation as well, is presenting the login screen as a Modal view. Once the user has successfully logged in, we then push the next appropriate view.
So if you are automatically pushed into the detail view by the storyboard viewcontroller, you could display the login dialog as a modal dialog from the detail view's DidLoad or DidAppear methods.