unwind-segue

Multiple unwind in the same button - Swift

久未见 提交于 2019-12-13 20:01:56
问题 I would like to know if it is possible to assign two different unwind method at the same button. For example: I have this views navigations: Home->A->B Home->C->B A and C views navigates to B, but then I want to return to previous views using the same B view and controller. It is possible? I have been thinking about write assign unwind method to the button programmatically depending what view comes. Thanks in advance I'm sorry about my english, is not good. 回答1: Although, question isn't very

How to unwind programmatically to 2 different VC

試著忘記壹切 提交于 2019-12-13 05:03:23
问题 If we have a situation where you have three ViewControllers. Yellow, green and white one. You can get to the white one through both yellow and green one. See the picture for more clarification: When I segue from yellow to white, I prepare for segue and set a NSUinteger jimmy_hendrix value to 0; When I segue from green to white, I prepare for segue and set a NSUinteger jimmy_hendrix value to 1; Inside the white VC, I made IBAction and connected a BACK button to it. In there, depending on the

Perform unwind segue programmatically

爷,独闯天下 提交于 2019-12-13 02:11:34
问题 Currently I have the following storyboard: UITableViewController -> Segue -> UINavigationController -> Relationship -> UITableViewController In the last UITableViewController I added a back button with the code below: navigationItem.setLeftBarButtonItem(UIBarButtonItem(title: "Back", style: UIBarButtonItemStyle.Plain, target: self, action: "unwind"), animated: true) let attributes = [NSFontAttributeName: UIFont.fontAwesomeOfSize(30), NSForegroundColorAttributeName: Constants.InterfaceColors

Manual unwind segue from UIImagePickerController fails with 'Receiver has no segue with identifier'

自闭症网瘾萝莉.ら 提交于 2019-12-12 04:48:14
问题 I've almost finished converting a large Universal app to use Storyboards, but have one issue that is stumping me. I have created a Scene for a custom UIImagePickerController, but I can't figure out how to unwind from it. I know I could just dismiss the controller, but I want to use the unwind process to pass the image back to the original source view controller. When I try to do the manual unwind, I get the following exception: 'NSInvalidArgumentException', reason: 'Receiver (

How to unwind and jump directly to the destination View Controller

懵懂的女人 提交于 2019-12-12 04:08:37
问题 I have three View Controllers. VC1 is embedded in a UINavigationController and the other two are accessible via Push Segues, so they are on the Navigation Stack. I've created an Unwind Segue to jump back from VC3 to VC1. The issue is when the unwind segue is triggered, it pushes to VC2 and pushed to VC1. Although this happens quickly, I would prefer if it just went to VC1 directly. Is this possible? 来源: https://stackoverflow.com/questions/46054177/how-to-unwind-and-jump-directly-to-the

Swift: unwind segue doesn't work

早过忘川 提交于 2019-12-12 01:52:32
问题 I'm stuck with unwind segue that doesn't work for some reason, I do everything as described in tutorial: cntrl drag to exit and select unwind action from another controller (please see gif attached). When I run it on my iphone and tap Cancel, nothing happens. 回答1: It looks like the view controller you're trying to unwind from is already the bottom of the UINavigationController 's stack, so it's not going to do anything when the unwind is called. If that UINavigationController is being called

TextFields don't get updated with values in unwind function Swift

早过忘川 提交于 2019-12-11 15:25:22
问题 I have textfields that should get a value displayed once returning from a TableViewController where user selects a cell. I get that value in unwind function, but textfields don't get updated. When printing the value it prints correctly on unwinding, so unwind should be set correctly, but it just don't get displayed in it's textfield . I also tried prepare(for unwind: in TableViewController but with same results. Can you see what I'm doing wrong? As always many thanks. unwind function:

Unwind Segue - Where to Drag Exit?

半世苍凉 提交于 2019-12-11 11:34:23
问题 I am trying to understand how the unwind segue works. First I created 3 ViewControllers. GlobalVC -LoginVC -RegisterVC I set the initial page the GlobalVC (only authenticated user can see). I set a segue from: GlobalVC to LoginVC called globalToLogin and LoginVC to RegisterVC called loginToRegister . Here is my storyboard: For the registerToLogin direction, I used this work-around (in RegisterVC), but looks a bit ugly. @IBAction func unwindToLogin(sender: AnyObject) { //Dismiss View

Tab bar with slide out menu

99封情书 提交于 2019-12-11 03:37:41
问题 RearViewController.m -(IBAction)unwindFromViewController:(UIStoryboardSegue *)segue { if ([segue.identifier isEqualToString:@"unwindToViewController"]) { ViewController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewController"]; [self presentViewController:detail animated:YES completion:nil]; } } If I click back from my RearViewController the ViewController is not presented instead it just peeps and goes off(again shows RearViewcontroller ). Image2 回答1: I give you a

How to create Unwind segue programmatically

我与影子孤独终老i 提交于 2019-12-11 02:24:48
问题 I make an application using no storyboard and in this part of my app I need to create a unwind segue from ThirdViewController to FirstViewController programmatically only. I know how to do it using sotorybard but can't find any solution how to do it programmatically. Any sugestions? 回答1: You can't create an actual segue without a Storyboard, but you can do the equivalent action by calling popToViewController on navigationController . Here is an example that is connected to a button to return