草庐IT

uinavigationbar

全部标签

ios - 呈现 View Controller 时缺少导航和标签栏

我正在使用3DTouch实现主屏幕快捷方式,它运行良好,但是我目前的方式意味着当快捷方式将用户带到特定的ViewController时,标签栏和导航栏会丢失。这是我的代码:funchandleShortCutItem(shortcutItem:UIApplicationShortcutItem)->Bool{varhandled=falseifletshortcutType=ShortcutType.init(rawValue:shortcutItem.type){letrootViewController=window!.rootViewControllerswitchshortcu

ios - 呈现 View Controller 时缺少导航和标签栏

我正在使用3DTouch实现主屏幕快捷方式,它运行良好,但是我目前的方式意味着当快捷方式将用户带到特定的ViewController时,标签栏和导航栏会丢失。这是我的代码:funchandleShortCutItem(shortcutItem:UIApplicationShortcutItem)->Bool{varhandled=falseifletshortcutType=ShortcutType.init(rawValue:shortcutItem.type){letrootViewController=window!.rootViewControllerswitchshortcu

ios - 导航栏中带有大标题或搜索栏的 UIRefreshControl 的故障动画

我有一个嵌入导航Controller的Controller,带有大标题和UIRefreshControl。当我在tableView上下拉刷新时,事件指示器的动画非常不稳定。我不知道我的代码中是否有不良行为?tableView.refreshControl=UIRefreshControl()tableView.refreshControl?.addTarget(self,action:#selector(downloadData),for:.valueChanged) 最佳答案 如果您已将导航栏半透明外观设置为false,则需要在V

ios - 导航栏中带有大标题或搜索栏的 UIRefreshControl 的故障动画

我有一个嵌入导航Controller的Controller,带有大标题和UIRefreshControl。当我在tableView上下拉刷新时,事件指示器的动画非常不稳定。我不知道我的代码中是否有不良行为?tableView.refreshControl=UIRefreshControl()tableView.refreshControl?.addTarget(self,action:#selector(downloadData),for:.valueChanged) 最佳答案 如果您已将导航栏半透明外观设置为false,则需要在V

ios - 在 CollectionView 中滚动 tableView 时隐藏 NavigationBar?

我有collectionViewController和collectionViewCell包括TableView。CollectionView是水平布局。我想在滚动tableView时隐藏导航栏。有什么想法吗? 最佳答案 从iOS8开始你可以直接使用self.navigationController?.hidesBarsOnSwipe=true这当然需要您的ViewController嵌入到NavigationController中。NavigationController的所有子VC都将继承此行为,因此您可能希望在viewWill

ios - 在 CollectionView 中滚动 tableView 时隐藏 NavigationBar?

我有collectionViewController和collectionViewCell包括TableView。CollectionView是水平布局。我想在滚动tableView时隐藏导航栏。有什么想法吗? 最佳答案 从iOS8开始你可以直接使用self.navigationController?.hidesBarsOnSwipe=true这当然需要您的ViewController嵌入到NavigationController中。NavigationController的所有子VC都将继承此行为,因此您可能希望在viewWill

ios - 如何在导航栏中设置多行大标题? ( iOS 11 的新功能)

我正在其中一个应用程序的导航栏中添加大标题。问题是标题有点长,所以我需要在大标题中添加两行。如何在导航栏中添加两行大标题?这与默认导航栏标题无关!这是关于iOS11中引入的大标题。因此,请确保通过考虑大标题来添加建议。谢谢 最佳答案 基于@krunal的回答,这对我有用:extensionUIViewController{funcsetupNavigationMultilineTitle(){guardletnavigationBar=self.navigationController?.navigationBarelse{retu

ios - 如何在导航栏中设置多行大标题? ( iOS 11 的新功能)

我正在其中一个应用程序的导航栏中添加大标题。问题是标题有点长,所以我需要在大标题中添加两行。如何在导航栏中添加两行大标题?这与默认导航栏标题无关!这是关于iOS11中引入的大标题。因此,请确保通过考虑大标题来添加建议。谢谢 最佳答案 基于@krunal的回答,这对我有用:extensionUIViewController{funcsetupNavigationMultilineTitle(){guardletnavigationBar=self.navigationController?.navigationBarelse{retu

ios - 快速更改后退按钮的字体和颜色

我正在使用Swift2.2开发应用程序。现在我想更改某个View的后退按钮字体和颜色。有问题的View有一个导航Controller,因为它是父Controller。我已经尝试在我的ViewController的viewDidLoad中运行以下两行self.navigationController!.navigationItem.backBarButtonItem!.setTitleTextAttributes([NSFontAttributeName:UIFont(name:"AndesRounded",size:17)!],forState:.Normal)self.navigat

ios - 快速更改后退按钮的字体和颜色

我正在使用Swift2.2开发应用程序。现在我想更改某个View的后退按钮字体和颜色。有问题的View有一个导航Controller,因为它是父Controller。我已经尝试在我的ViewController的viewDidLoad中运行以下两行self.navigationController!.navigationItem.backBarButtonItem!.setTitleTextAttributes([NSFontAttributeName:UIFont(name:"AndesRounded",size:17)!],forState:.Normal)self.navigat