iphone - 子类化 UINavigationController 的步骤

标签 iphone uinavigationcontroller customization

我想对 UINavigationController 进行子类化,以便在 Controller 的外观方面获得更多自由。

我有一些不同部分、栏、按钮、文本等的图形。 查看 UINavigationController 头文件我几乎没有得到任何帮助,我不知道从哪里开始。

我以前从未子类化/重写过 UIKit 组件,看起来有点像玩 Sherlock Holmes。

方法是什么?

我如何知道要覆盖哪些内容才能将特定图形“注入(inject)”正确的位置?

我是否需要子类化 UINavigationBar、UIBarButtonItem 等才能获得完整的自定义外观?

我如何知道某些内容是否受到 Apple 批准的限制?

希望有人能为我指明正确的方向,我只能找到更改 Controller 小部分的示例,而不是通过子类进行完全自定义。 我是否以错误的方式处理这个问题?

谢谢:)

最佳答案

现在您可以子类化 UINavigationController,请参阅更新的文档:

The UINavigationController class implements a specialized view controller that manages the navigation of hierarchical content. This navigation interface makes it possible to present your data efficiently and also makes it easier for the user to navigate that content. This class is generally used as-is but may be subclassed in iOS 6 and later.

UINavigationController Class Reference

关于iphone - 子类化 UINavigationController 的步骤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3029959/

相关文章:

iphone - 在 iphone 中将图片上传到 flickr 时出错(Xcode 4.2)

objective-c - 我需要一些关于 UINavigationControllers/UIBarButtonItems 的信息

c++ - 更改 QProgressBar 中的填充

iphone - 我不明白为什么我的 iPhone 应用程序内存不足

ios - 我在哪里可以找到用于启动 xamarin IOS 应用程序的 iphone 模拟器

iphone - iOS:链接第三方框架并在部署时崩溃

swift - 将导航 Controller View Controller 设置为 CNContactViewController 黑屏

iphone - 来自 tableViewController 子类的 UINavigationController pushViewController

customization - 在 iOS 8 中自定义 UIAlertController 以包含 UITableView 等标准元素

php - 自定义 SQL 从类别数组中获取帖子,并从排除的类别中返回 id。怎么了?