Questions tagged [segue]

In iOS and Mac OSX, segue is a configurable object which specifies a transition from one scene to another.

5089 questions
323
votes
4 answers

What's the difference between all the Selection Segues?

Show Show Detail Present Modally Popover presentation Custom What is the difference between them? I couldn't find any documentation on it. There used to be some which I found in a Google search, but it's now gone:…
User
  • 20,562
  • 35
  • 99
  • 185
317
votes
10 answers

How to perform Unwind segue programmatically?

Using storyboard this is very easy. You just drag the action to "Exit". But how should I call it from my code?
tadasz
  • 4,288
  • 5
  • 24
  • 33
252
votes
10 answers

Prevent segue in prepareForSegue method?

Is it possible to cancel a segue in the prepareForSegue: method? I want to perform some check before the segue, and if the condition is not true (in this case, if some UITextField is empty), display an error message instead of performing the segue.
Shmidt
  • 15,652
  • 16
  • 79
  • 129
237
votes
15 answers

Programmatically go back to previous ViewController in Swift

I send the user over to a page on a button click. This page is a UITableViewController. Now if the user taps on a cell, I would like to push him back to the previous page. I thought about something like self.performSegue("back").... but this seems…
Christian
  • 5,910
  • 9
  • 38
  • 77
203
votes
13 answers

Creating a segue programmatically

I have a common UIViewController that all my UIViewsControllers extend to reuse some common operations. I want to set up a segue on this "Common" UIViewController so that all the other UIViewControllers inherit. I am trying to figure out how do I…
Tiago Veloso
  • 8,033
  • 17
  • 58
  • 82
194
votes
10 answers

IOS - How to segue programmatically using swift

I'm creating an app that uses the Facebook SDK to authenticate users. I'm trying to consolidate the facebook logic in a separate class. Here is the code (stripped for simplicity): import Foundation class FBManager { class func…
Shlomi Schwartz
  • 11,238
  • 25
  • 93
  • 155
176
votes
5 answers

Perform Segue programmatically and pass parameters to the destination view

in my app I've a button that performs a segue programmatically: - (void)myButtonMethod { //execute segue programmatically [self performSegueWithIdentifier: @"MySegue" sender: self]; } I would like to know if there is a way to reference the…
yassassin
  • 3,165
  • 6
  • 26
  • 30
107
votes
10 answers

Conditionally start at different places in storyboard from AppDelegate

I have a storyboard set up with working login and main view controller, the latter is the view controller to which the user is navigated to when login is successful. My objective is to show the main view controller immediately if the authentication…
mmvie
  • 2,451
  • 6
  • 22
  • 37
93
votes
13 answers

Dark shadow on navigation bar during segue transition after upgrading to Xcode 5.1 and iOS 7.1

When I am navigating back & forth between parent and child controllers in a master - detail navigation controller, i see a dark shadow on the right side of navigation bar at top. It started after I upgraded to Xcode 5.1. It feels rough and…
Nihat
  • 2,925
  • 3
  • 16
  • 26
92
votes
1 answer

What are the differences between segues: "show", "show detail", "present modally", "present as popover"?

What do the different segues do in Xcode 6?
Red
  • 1,325
  • 1
  • 9
  • 12
90
votes
11 answers

Push segue in xcode with no animation

I am using normal storyboarding and push segues in xcode, but I want to have segues that just appear the next view, not slide the next view (as in when you use a tab bar and the next view just appears). Is there a nice simple way to have normal push…
R2D2
  • 2,522
  • 3
  • 22
  • 41
88
votes
13 answers

How to present view controller from right to left in iOS using Swift

I am using presentViewController to present new screen let dashboardWorkout = DashboardWorkoutViewController() presentViewController(dashboardWorkout, animated: true, completion: nil) This presents new screen from bottom to top but I want it to…
Umair Afzal
  • 4,398
  • 5
  • 22
  • 46
77
votes
9 answers

Storyboard Segue From View Controller to Itself

I am trying to make a mechanism to drill down a file / folder list. The idea is to show the same file list view controller every time the user selects a folder, and show a file detail view controller if he/she selects a file. So far, I have created…
Jorge
  • 2,475
  • 1
  • 18
  • 27
69
votes
8 answers

Swift pass data through navigation controller

One of my segues transitions from a view controller to a tableview controller. I want to pass an array between the two, but with a navigation controller before the tableview controller, I can't figure out how to pass the array. How do you pass data…
user3142972
  • 867
  • 1
  • 8
  • 11
69
votes
1 answer

IOS7, Segue and storyboards - How to create without a button?

I currently have a login View and an Application view, I have successfully implemented validation on the login view and I need to programmatically shift to the application view on successful validation. I understand I can add a segue to the login…
LiamB
  • 17,263
  • 19
  • 72
  • 112
1
2 3
99 100