iMessage navigation controller bar hidden when expanded - ios

I'm working on a new iMessage app and am seeing some weird behavior. When I expand the app from compact to expanded the navigation bar disappears. To simulate it create a controller thats embedded in a navigation controller. Have it segue to another controller and in compact it acts normal with a back button. Expand it and the navigation bar is missing. I did the segue with a button tap and doing the flow when everything is expanded still has the issue.

There seems to be a bug in iMessage. This worked for me
https://agilewarrior.wordpress.com/2017/06/13/how-to-deal-with-imessage-navigation-bar-covering-top-of-view-bug/

Related

Layout issues when working with TabController, NavigationController and NavigationView (SwiftUI) together

I am working on the iOS legacy codebase with some SwiftUI views built. Everything looks good when app gets launched, but the Tab Bar title will be missing when navigate to another screen (either ViewController or SwiftUI view). It happens when navigate at the first time, the tab bar title will keep missing even though pops back.
This is how the tab bar looks after launching at the first time.
This is how the tab bar looks after navigating the other screens.
One more issue that I am facing is the navigation bar will be duplicate when navigate to a ViewController from SwiftUI view. The top one will be the nav bar from SwiftUI with a back button, the duplicate one will be from ViewController below the first one without the back button. What I expect is either the one from SwiftUI view with nav bar title, or the one from ViewController with the back button.
The top one is from SwiftUI view
Does anyone have some ideas how to fix them? Thank you!

The back button in a navigation bar is shown in ios7/ios8 but not in ios9

The device runs ios8 and the back button is properly shown and I can use a swipe gesture on the device to navigate the view stack.
On the simulator (running ios9), the back button will not appear, and the swipe gesture does not work.
UPDATE: I have updated the device to use ios9, the back button vanished.
I have now found the source for this.
In the storyboard, the navigation controllers were cascaded.
The segue of the first controller stacked another full view controller, not just the view. On that view controller, the navigation was not properly initialized.
On ios7/ios8, this made no difference, the root-navigation controller's navigation bar was used. In ios9, it seems, that the navigation bar of the initial navigation controller is overwritten or it requires specific segues to the parent navigation view.
If the swipe feature is also dependent on the missing navigation bar initialisation, I have not tested. I have removed the superfluous navigation controllers and directed the segues directly to the views and now it works.

iOS Swift: Incorrect Navigation Bar Appearing

The incorrect navigation bar is appearing on my Table View Controller screen (see Storyboard Below).
I would like what's displayed on the storyboard to be my navigation bar (i.e. with "Main Feed" title and Sign Out button on the top right). However, this is what I'm actually getting -
There are two issues here: 1) The incorrect navigation bar is displaying (this one has a login back button); 2) the first few table view cells are placed underneath the nav bar vs. under it.
This happened after I embedded the Table View controller in the Tab Bar Controller. I want a bottom tab bar in the main portion of my application hence the reason why I added the Tab Bar Controller. Any suggestions on how to fix this? Rather than using the Tab Bar Controller in storyboard, is there a way to do this programatically? Thanks!
The navigation bar that you are seeing on top of the stack is the navigation bar from the UITabBarController itself, that is why you are seeing the back button show "login". There's a few ways to work around this, programmatically:
When you initialize the UITabBarController, set it's navigationController's navigation bar property to "hidden"
Go through each view controller form the beginning of your app up to where you first see this problem and in the "init" method of the viewController you are testing, set the navigationbar to hidden. Something like, self.navigationController?.navigationBar.hidden = true;
This is how you can "debug" this issue, but it's going to take some tweaking to get it right.

UINavigationController is pushing like modal on iOS 7

My first viewController has a uitableView inside with a segue made on storyboard dragging the cell to the next view and selecting "show".
On the first viewController the navigation bar shows up just fine.
The push works perfectly on iOS 8, coming from the right side.
On iOS 7 it seems like the push is working on MODAL style, the next view controller comes from the bottom and the navigation bar is gone!
Anyone seem something like that?
Change your segue type to "Push" in Deprecated section. Look at the attached screenshot

Xcode Storyboard issue - Button Bar Button only appears at the bottom of a TableViewController

Not sure if this is a bug in Xcode 6(I use Beta 4) or expected behaviour.
When I have a View Controller in a Navigation Controller and 'push' (deprecated segue) a Table View Controller(TVC) I can drag a Bar Button Item to the Navigation Bar in the TVC.
When I do the same but 'show' (new adaptive segue) the TVC, the Bar Button Item drops to the bottom, and in fact doesn't show up when I build the project.
A hack to resolve this problem is to set it up as 'Push' to begin with, drag on the Bar Button Item, and then change the segue to 'Show'. But - is this necessary? Is this an Xcode Bug or am I missing something?
I have tried creating the issue you are facing with bar button at bottom. It’s not an issue or Xcode bug.
But in new Xcode when you use segue to ’Show (e.g. Push)’ then in next view you won’t get navigation bar.
You need to add navigation bar and then add bar button item to navigation bar.
Hope your problem will be solved.
I had the same issue and fixed it by simply selecting the view controller and changing the "Top Bar" to "Opaque Navigation Bar" from Inferred. This let me add the Bar Button Item on top.

Resources