Segue from UIViewController to UITableViewController has no effect - ios

The issue I am having is in this particular part of the storyboard. When the table view loads it is populated correctly and everything works fine, then one of the cells can be selected and the view on the right loads up with everything fine(push). However, when selecting 'Back to News' nothing happens(push). If I press the button (nothing happens) and then select one of the other items housed in the tab bar and then select the news tab again the app has returned to the table view and all is well.
The layout can be seen here: http://imgur.com/EaMbM4i
I am not sure what code is needed but can post whatever is requested.
My question is this, what is wrong with segue between the 'Back to News' button and the UITableViewController?
Apologies for any mistakes made, it is my first post.

You dont want to push to the tableview controller again from the news detail view controller.
There will be a back button by default since it is in navigation controller.

Related

Navigation bar breaks in Tableview / detail view inside Tab bar controller

This is a bit of a tricky one to explain here so I'm hoping the screenshot of the storyboard of the app I'm trying to build helps to clarify what I'm trying to do.
Basically the apps starts with a nav controller and table view, when you click on a cell in the table view you go to a tab bar controller with three tabs, each tab view has its own navigation controller and subsequently there is a navigation bar on each of them, so at this point there is a back button on all tab views which takes us back to the initial table view.
The first tab view simply has some text, the next has a table view with several table cells and the last has a map view with several markers. Both the table cell and the map markers link to a detail view via a navigation controller which shows more detailed information (both via named segues). It's at this point of clicking through to the detail view where the navigation is breaking, the detail page shows no navigation bar although it is there as the title text is set, but there is no back button and it seems that the navigation context / hierarchy has been broken here somehow. The appearance of the storyboard also reflects this as it shows no Back button on the navbar on the navigation controller or the Detail view.
Without initially getting into the code in any real way I am just trying to see if there is any significant reason why these type of structure / hierarchy is just now going to work. So, my main question is does this storyboard structure seem like the correct way to go about what I'm trying to do?
Here is the storyboard:

Split Controller master table view pushes to master nav stack not detail

I am trying to set up a very basic Split View Controller. The left side (master) is a table view, which when a row is tapped, I expect to load details into the right side (detail).
I do not know what I'm doing wrong. I have an example project that functions exactly how I want it to, but I'm missing something in my main project. I've very carefully scoured the example project and as far as I can tell, everything is done exactly the same in my main project.
The problem I'm having is, when I tap a cell in my table view, the view controller that is invoked, appears in the master (left side), not in the detail (right side).
My question is: what exactly do I have to do to get the right side to display the detail?
I'm testing on an iPhone 7 Plus Simulator in landscape mode. Portrait mode works fine.
As far as I know I have all the correct delegate setup complete. Thanks in advance!
Wow! Okay, I figured out what was wrong. This has got to be a bug in the storyboard UI, because it does not make sense that this would be the problem.
When I ctrl-dragged from the table view cell to the nav controller so as to create the detail segue, I chose "show". I then realized that it should actually be "show detail", so I went into the attributes of the segue that I just created and changed "Kind" to "Show Detail (e.g. Replace)", which as far as I know, should end up being the same thing as if I would have selected "Show Detail" when creating the segue. It is not.
After a great deal of trial-and-error, I discovered that I had to delete the segue I originally created and re-create the segue, selecting "Show Detail".

Back button does not show up in navigation controller

I have added a show segue from table cell in one view controller to another table view embedded in a navigation controller. When I click on the cell in the first view the segue works as expected and brings up the new view. However, the "Back" button (with the title of the original view) does not appear in the navigation bar.
I searched SO and found a number of such questions asked in the past (both for Swift and Objective-C). Most of them suggest that the first view needs a title for this to work. I do have a title. I even added one programmatically, just in case. That did not help. One of the answers suggested to add an identifier to the segue; that didn't help me either.
How else can I debug this issue?
It seems like the problem is that you are pushing into a totally new navigationController, remove it, and make segue dirrectly into the new view Detail itself, they have to be in the same navigationController to work
Verify you are not hiding backbutton in destination controller...
I had a left bar button item in storyboard removing the button, back button showed up.

Swift - Unable to Show Detail View with Naivgation

I am running into a very strange issue here when it comes to segues between table view controller and details view.
It works with one implementation, but when I followed the same steps (& code) it doesn't work somewhere else.
Basically I have a table populated from Parse backend and once a row is clicked it would show the details for that record. For Orders View Controller, when the row is selected, it shows the detail view with a navigation in top (inherited) and a back button to the list. In the Friends Controller, when I click on a friend row, it shows the details view with details of a friend correctly. But no navigation top bar and no back button.
I also noticed the animation in the Orders scenario is different (left slide) where as in the Friends scenario (not working) it is more of coming from bottom to top.
Below are details to help assess the problem further and am glad to offer more upon request since I am not sure what part is relevant or not.
Now for the Friends scenario:
To illustrate the flow of the order, it goes like this:
I tried doing this but it didn't work:
self.navigationController?.navigationBarHidden = false
I think problem is segue between Friend view and Detail Friend view. Go storyboard and choose segue between them same config with image below:
Hope this help!
Try redoing the segue. Just Ctrl-drag from the prototype cell to the detail view controller. Make sure that you make a segue of type show.

The TabBarItem disappear when I push in other view

I have a TabBarApplication with four views in the main TabBarItem. The problem comes when I go to any of these views and click in any button to go to another view and when I go back by a button linked to the main view, the TabBarItem of the app disappear!!
For example, one view of the app is a tableView in which each element of the list is linked to his external view and it has a back button that should return to the tableView. All the segues are by modal, not push because push segue crash the application and by modal it runs correctly but the problem comes when I returned by clicking the back button of the NavigationItem in the header of the view to his main view and the TabBarItem of the app is not there, is empty.
Each tab should have the view controller set to a navigation controller, with the view controller you want set as the root view controller of the navigation controller. Now you can use push segues and the standard back button that will be added for you. This will bypass the issue (and work much better for you and users).
You current issue is likely related to not really ever going back. Instead, just always presenting new modal view controllers which replace any existing content on screen.

Resources