ios - Xamarin IOS 更改选项卡项的 View Controller

标签 ios xamarin xamarin.ios uitabbarcontroller

我正在尝试使用 Xamarin iOS TabBar Controller 。

我的场景。

共有三个选项卡,选项卡 1、选项卡 2 和选项卡 3。 有四个画面,画面一、画面二、画面三、画面四。

所以选项卡 1 显示屏幕 1,选项卡 2 显示屏幕 2,选项卡 3 显示屏幕 3。屏幕 3 上有一个按钮,单击该按钮时,选项卡 3 需要显示屏幕 4。

我正在为此苦苦挣扎。感谢您的帮助。

enter image description here

最佳答案

为了举例,让我们调用 Screen3 -> ThirdViewController - 当您点击 Tab 3 时显示。让我们调用 Screen4 -> FourthViewController

为了从 ThirdViewController 导航到-> FourthViewController,您需要首先将 ThirdViewController 包装在 UINavigationController 然后简单地调用 PushViewController导航到 FourthViewController

使用 Storyboard的示例: https://github.com/pnavk/XamarinTabsDemo

enter image description here

关于ios - Xamarin IOS 更改选项卡项的 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37059257/

相关文章:

javascript - 通过 JavaScript/网络应用程序在设备上引导 OneDrive

c# - 安卓进度条消失

c# - 通过单击自定义 UICollectionViewCell 中的按钮来执行 segue

windows-phone-7 - MvvmCross vNext : Using System. PCL 中的 IO.压缩

ios - 如何实现 UITableView 部分

ios - 如何切换IOS相机

ios - NSInvalidArgumentException 无法识别的选择器发送到实例

c# - Xamarin iOS WkWebView 和 WebRTC 麦克风无法在后台工作

listview - iOS 上的无限 ListView 刷新后跳转到第一项

iphone - UIWebview 和 iPhone 内容不回发(ASP.NET 浏览器功能问题)