簡體   English   中英

不是主視圖/根視圖時的UINavigationController用法

[英]UINavigationController usage when not the main/root view

當UINavigationController不在應用程序的根目錄時,我會遇到麻煩(使用UINavigationController(帶有Interface Builder))。 我發現了許多示例,這些示例演示了如何在應用程序的根目錄(在MainWindow.xib中)使用這些控制器之一; 但是,我的應用程序並非采用這種結構。 我有一個UIScrollView,這是我的主要顯示內容。 從滾動視圖屏幕中,我有一個“設置”按鈕。 當按下該按鈕時,我希望顯示的下一個視圖控制器是具有UINavigationController的屏幕。 此屏幕是典型的帶有分組表的“設置”屏幕。 輕觸單元格后,導航控制器會將另一個控制器推入包含相關設置選項的堆棧中。

我的主要問題是了解在這種情況下如何實現UINavigationController。 如果有人有任何示例或建議,將不勝感激。

請不要簡單地將我指向有關View控制器或Navigation控制器的Apple文檔。 我已經閱讀了這些文檔,但仍然不明白。 我需要一些真正的幫助和建議。

好吧,您需要重新閱讀這些文檔,特別是UINavigationController上的文檔。

您錯過的一點是您沒有實現 UINavigationController 使用該類並將自己的viewcontroller推入該類。

您似乎還混淆了UITableViewController. The two are completely different. Your settings would be implemented as aUINavigationController UITableViewController. The two are completely different. Your settings would be implemented as a UITableViewController. The two are completely different. Your settings would be implemented as a UITableViewController. The two are completely different. Your settings would be implemented as a UITableViewController subclass and pushed on a the UITableViewController. The two are completely different. Your settings would be implemented as a subclass and pushed on a the UINavigationController`上。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM