我有一个 UIViewController 类 SurveyPanel,它像这样从 UIViewController 继承
SurveyPanel : UIViewController
然后我有另一个 UIViewController 类,称为 AnnouncementPanel,它继承自 SurveyPanel
AnnouncementPanel : SurveyPanel
我需要 AnnouncementPanel 来显示来自 SurveyPanel 的按钮和特定于 AnnouncementPanel 的按钮,但目前它只会显示 SurveyPanel 中的组件。这可能是我在 AppDelegate.cs 中加载控制器的方式吗?目前我正在做:
window = new UIWindow(UIScreen.MainScreenBounds);
AnnouncementPanel viewController = new AnnouncementPanel();
window.RootViewController = viewController;
window.MakeKeyAndVisible();
return true;