- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 View Controller ,它的导航栏有一个段控件。现在我想重用这个 View Controller 来显示带有标题而不是段控件的其他内容。我试图将段控件的隐藏属性设置为 true
并设置 self.navigationController?.title = "foo"
,不幸的是,没有标题显示:(
如何以编程方式将 UISegmentedControl
替换为我的导航标题?
最佳答案
您必须设置 titleView property navigationController
到 nil
自文档状态
If this property value is nil, the navigation item’s title is displayed in the center of the navigation bar when the receiver is the top item. If you set this property to a custom title, it is displayed instead of the title. This property is ignored if leftBarButtonItem is not nil.
关于iOS - 以编程方式将 SegmentControl 替换为导航标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32540449/
我有一个 View Controller ,它的导航栏有一个段控件。现在我想重用这个 View Controller 来显示带有标题而不是段控件的其他内容。我试图将段控件的隐藏属性设置为 true 并
我需要在 SegmentController - Swift 中设置图像。 let testTypeSegmentedControl: UISegmentedControl = { l
我正在使用段控制。它包含两个数据。一个数据是默认的,我需要在段中显示默认值。 我正在设置这样的默认数据: - (void)awakeFromNib { [super awakeFromNib]
我想使用段 Controller 显示两个 Collection View ,在更改段时将显示第二个 Collection View 。我的代码是: -(UICollectionViewCell *)
所以我正在为跨平台应用程序使用 Xamarin 表单,主 UI 是一个选项卡式页面,其中一个页面有一个 segmented control。其中,段控件将切换 ListView 控件的数据。问题是当我
Segcontrol = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"Mind", @"Munches"
我在项目中使用了段控制。在其选择中,我正在显示我的表格 View 数据,但在加载后没有显示任何内容,但在按下按钮后显示所有数据。所以问题是默认情况下我的段控件被选中,但数据没有填充到 TableVie
我已经按照 UINavigationBar 进行了设计,但是我有点困惑是否可以像下面这样添加一个 segmentControl?实现这一目标的最佳方式是什么? 最佳答案 UInavigation 栏的
是否可以在 ActionSheet (UIAlertController) 中实现 SegmenControl 我该怎么做?谢谢。 Example 最佳答案 这是无需 UIActionSheet 即可
我正在尝试创建具有多个 tableViewController 的 pageViewController,但是我想在 tableView 之间创建一个导航,因此我想要一个像这样的 navigation
我希望“自动”点击索引为 0 的 segmentController。 我的基于 tabBar 的应用程序在 ViewDidAppear 方法的选项卡中有多个 segmentControllers,我
我是一名优秀的程序员,十分优秀!