你如何使用这个新对象来自定义 iOS 13 中的导航栏?我在 Objective-C 中尝试了以下代码,但它无法正常工作。它仅在视图控制器被推送或弹出到导航堆栈时显示我的标题文本属性。
UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];
appearance.titleTextAttributes = @{NSFontAttributeName: font};
这是此对象的文档。 https://developer.apple.com/documentation/uikit/uinavigationbarappearance?language=objc