Setting title of UINavigationBar(设置 UINavigationBar 的标题)
问题描述
我有一个应用程序,它使用主故事板包含一个导航控制器,其中主视图是使用原型单元格内容的表视图.表格视图中的每个单元格都会推送到我使用它自己的一组 .h .m 和 .xib 文件创建的新视图上.
I have an application which uses a main story board to include a Navigation Controller where the main view is a Table View using a prototype cell content. Each cell in the table view pushes onto a new view which I have created with it's own set of .h .m and .xib files.
表格视图导航栏的标题通过故事板设置,效果很好.但是,在将每个新视图推入视图后,我无法为其设置标题.
The table view navigation bar has its title set through the story board which works fine. However, I am having trouble setting the title for each new view after it gets pushed into view.
我在每个视图的 viewDidLoad 方法中都有以下内容;
I have the following in the viewDidLoad method for each view;
self.title = @"View Title";
有什么建议吗?
推荐答案
这是正确的方法.它会起作用的.
it is the right way. it will work.
这篇关于设置 UINavigationBar 的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:设置 UINavigationBar 的标题
				
        
 
            
        基础教程推荐
- UIImage 在开始时不适合 UIScrollView 2022-01-01
 - 如何将图像从一项活动发送到另一项活动? 2022-01-01
 - Android Volley - 如何动画图像加载? 2022-01-01
 - SwiftUI-ScrollViewReader的ScrollTo不滚动 2022-01-01
 - 如何比较两个 NSDate:哪个是最近的? 2022-01-01
 - Play 商店的设备兼容性问题 2022-01-01
 - iOS - UINavigationController 添加多个正确的项目? 2022-01-01
 - navigationItem.backBarButtonItem 不工作?为什么上一个菜单仍然显示为按钮? 2022-01-01
 - Xcode UIView.init(frame:) 只能在主线程中使用 2022-01-01
 - 为什么姜饼模拟器方向卡在应用程序中? 2022-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
				
				
				
				