With Swift, I'm trying to push segue from one TableViewController to another when I'm selecting a table view cell from the first, however. This occurs.
http://imgur.com/a/HK5Ew
Is there any reason for it? Storyboard in the album too
Related
I am little confused with the way that segue is working in my app.
I have TabBarController and my ViewController inside it is embedded in NavigationController.
I added identifier to segue "mySegue". So when i perform some action inside my ViewController I run
performSegue(withIdentifier: "mySegue", sender: self)
So segue is performed but I have some things that I don't understand.
View is presented without tab bar and navigation bar. Why? I thought that they should be visible by default.
I want segue to be animated - so view will be presented from right to left and also I will be able to unwind it (simply go back by swiping). But swipe back is not working and view is presented from bottom to top. Why is it?
You should set the segue's type to Push - that way the navigagtion controller will issue the hierarchy and it will actually get pushed to its stack, hence the name.
If you want your segue to transits horizontally, you need to use (Show e.g push) for the segue, like this. It has swipe back by default
As it was not the first time when I meet this problem - I need to point where the problem was. Maybe it will help others when it seems that everything in segue is made right way but it is not working the way it should.
In my case - it was because segue was created in interface builder by dragging not from the ViewController's yellow circle to second ViewController. Segue was created from one of subviews or even TableView / TableViewCell inside ViewController. So in that case it wasn't creating segue in NavigationController.
i have my application with 2 UITabBars - on the first mapview, on the second tableview. So what i want is to perform segue by tapping on the tableview cell and go to map(with some data). My problem is to make some realisation for automatic switching(or at least manual) between selected indexes tabbars.
Now if tap on the cell i will have TWO tabbars with TWO maps
I think you're reinstantiating the whole view by performing a segue. Look at this other issue: How can I segue to the second tab of a tab bar controller from the first tab? You probably can fix the issue by performing a standard selector that changes the selectedViewController property of the tabBar (probably passing more info), instead of a segue.
I've just created a Segue from a ViewController (which is embedded in a UINavigationController) to another ViewController. It seems like that the new Segue types do not create the UINavigationItem (which contains the title label) on Segue creation as the push Segue type did in iOS 7. I've noticed this fact because I couldn't enter any title for the "new" ViewController after I created the Segue. There is also no place where I can properly place a bar button item.
I couldn't find anything regarding this fact in the Segue documentation so I was wondering if the UINavigationItem isn't automatically being created anymore. It doesn't even show up in the document outline. Does somebody know something about that? Maybe it's just a Xcode Beta 3 issue?
Here is a picture of the segue in the attributes inspector:
It seems like a bug, it normally fixes it self after restarting Xcode but quick fix is just to drag a navigation item from the object library onto the view controller.
I have a container view which embeds a navigation controller (UINavigationController) with a root view that is a UITableViewController. One of the prototype cell has a push segue on selection to another UITableViewController. This is all via the storyboard in XCode 5. No actual code.
Unfortunately nothing happens when the cell is selected.
What am I missing?
Thanks
I tried before with that structure and it should work well. Here is an example screenshot of the full storyboard:
Found the solution. In my controller showing that custom animated controller, I needed to use addChildViewController.
I'm trying to set up a basic "Newsfeed" function for an iOS app, with headlines in a TableViewController segueing into a simple ViewController to display the text of the selected story. I'm using Storyboards to set up the segues, and I can't get it to work...
What I've Done - I started by CTRL+Dragging from the Cell of the TableView onto the secondary ViewController and choosing "Selection Segue - Push." Then I clicked on the segue and gave it the identifier "newsArticleSegue," and I embedded the TableView in a Navigation Controller. I've got the TableView data source hooked up to a plist file as well, although I don't think that would have any effect on the segue, right?
All that happens when I run the app and click on a row of the TableView is that it gets highlighted blue. Clearly the segue isn't working, but the tutorials I've found only list those steps, as though that's all that's needed...
Can anyone tell me what I am missing? And thank you in advance!
When you create the segue with IB, you can drag from the view controller (which you did) or from the table view cell, which will call the segue if the table view cell is selected.