uinavigationcontroller

difference between navigationBar.isHidden and setNavigationBarHidden

痞子三分冷 提交于 2020-08-08 03:37:04
问题 I have view controller which I am pushing from a view controller where navigation bar is hidden. But I want to show the navigation bar in destination view controller. I tried with this statement it was not showing navigationBar. self.navigationController?.navigationBar.isHidden = false I tried this statement it is working self.navigationController?.setNavigationBarHidden(false, animated: true) I want to know what is difference? 回答1: Nope they are not the same, self.navigationController?

navigationController title

孤街浪徒 提交于 2020-08-03 12:21:11
问题 I am working on an app with a navigation controller. I know how to set the title when the view loads initially. I push a new view controller and set it's title. Now the problem is when I press the back button, the title for the original view controller is not there anymore. I tried to do... - (void)viewWillAppear:(BOOL)animated { self.navigationController.title = @"Some Title"; } This did not set the title though. Does anyone know what I can do? 回答1: The UINavigationController gets the value

Large title to small title switch in navigation bar is not smooth iOS 13, sticky

守給你的承諾、 提交于 2020-07-14 03:00:17
问题 I have a UINavigationController with default value of it's navigationBar.prefersLargeTitles = true . I am switching that to false when I push into a new scene lets call it ( DetailsViewController ), by changing it into the viewWillDisappear . override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) navigationController?.navigationBar.prefersLargeTitles = false } Now in DetailsViewController I am using willMove(to parent:) . override func willMove(toParent parent:

Added Tableview data is not coming, why in swift?

怎甘沉沦 提交于 2020-06-28 04:14:31
问题 I am sending data to tableview from 3rd view controller to first view controller, now for the first time data is adding to tableview but if go from 1st view controller to other view controller and i come back to first view controller then the added data in table view is coming why? in 3rd view controller sending data to 1st view controller table view like below: var viewController: UIViewController? @IBAction func confirmBtn(_ sender: Any) { for controller in navigationController?

Functional difference, UINavigationController vs Only Storyboard Segue

一笑奈何 提交于 2020-06-24 14:02:54
问题 So UIKit Framework Reference describes UINavigationController as an efficient way to present data and views to user. But I'm curious as to the performance and manageability differences between using UINavigationController VS Segue Only. There must be certain situations that one is better-suited than the other. I am entirely new to coding but instinctually I imagine UINavigationController is more for presenting VC's that each have a lot going on and user spends much time on each VC equally or

UINavigationController calls willMoveToWindow and didMoveToWindow twice on a view, in the case of show animation

我是研究僧i 提交于 2020-06-17 01:27:29
问题 I want to be able to check when a view, let's call him myView, goes on/off screen. I was able to do so by checking if willMoveToWindow and didMoveToWindow are called on myView. My problem started with UINavaigationController with animation: Lets say we have a two screens: Screen A with a button that will result in a Show segue with a back button as the navigation control. The problem is: The views of screen A are called twice once clicking on the button: The first time viewWillMoveToWindow is

UINavigationController calls willMoveToWindow and didMoveToWindow twice on a view, in the case of show animation

笑着哭i 提交于 2020-06-17 01:26:28
问题 I want to be able to check when a view, let's call him myView, goes on/off screen. I was able to do so by checking if willMoveToWindow and didMoveToWindow are called on myView. My problem started with UINavaigationController with animation: Lets say we have a two screens: Screen A with a button that will result in a Show segue with a back button as the navigation control. The problem is: The views of screen A are called twice once clicking on the button: The first time viewWillMoveToWindow is

NavigationBar Buttons Click Area not working properly (Image is not clickable)

一曲冷凌霜 提交于 2020-06-12 07:17:10
问题 Xcode 11.4 - iOS 13.4 Navigation bar UIBarButton items are not working as expected. (I used storyboard for buttons - no code written) It was working just fine after I updated Xcode. Now it is not working. Only Green area can be touched. Images can not. I also checked Screen Debugger and everything is seems correct. There is a question like this but for search bar and push. However, answers not solving my problem. If you can not figure out how the hell is not working? You can also check this

Customize navigation bar by adding two labels instead of title in Swift

半世苍凉 提交于 2020-05-24 12:01:05
问题 I am trying to add two labels in the place where the title is shown in navigation bar, but I am struggling to do so. It would be very nice if I could achieve this with storyboard but as I can see I cannot do it. As I have seen I need to use navigationItem but I do not know how exactly to do that. If anyone have any example or if anyone could explain me more specifically how to do so would be wonderful. And I need to mention that I am completely unfamiliar with Obj-C, so any help would need to

Xcode 11 UINavigationController Bar problems

喜夏-厌秋 提交于 2020-04-12 02:26:11
问题 Ever since Xcode 11 came out I have been trying to fix my app. There is something going on with the Status Bar + Navigation Bar and nothing I have been trying seems to be working and I can't seem to find any related issues either. I have tried instantiating the Tab Bar Controller with less/more tabs. I tried changing the order. I tried using a navigation bar on the Tab Bar controller instead of the individual view controllers. For some reason the first View Controller (root of a UINavigation