segue

Swift 3 - Passing data between a View Controller and after that to another 2

旧巷老猫 提交于 2019-12-19 11:19:32
问题 I'm trying to perform a segue which it doesn't work. What i'm trying to do is send the data which i have in a textfield in my View Controller(Main), after that i want to send it to a ViewController called OperationsController and after that send it to another Views (CreateController & ListController) so i can use that same data and send it to a php file and get data to populate a table view in ListController. And for CreateController to get the email (which is in short words the data) and

Perform Segue in ViewDidLoad [duplicate]

好久不见. 提交于 2019-12-19 05:24:14
问题 This question already has answers here : Perform Segue on ViewDidLoad (12 answers) Closed last year . I`m trying to perform a segue if its the first time the app is loading. I can see my print message in the debugger, but the Perform Segue is not working. I don't get any errors. Can somebody please tell me whats wrong? import UIKit import LocalAuthentication let isFirstLaunch = UserDefaults.isFirstLaunch() extension UserDefaults { // check for is first launch - only true on first invocation

when preparing for segue array contains no data (using swift)

回眸只為那壹抹淺笑 提交于 2019-12-19 04:44:10
问题 Depending on what button is pressed I want to append a list of words to variable (pickedList) declared at the start. When I come to prepare for segue it overwrites what has been added and only using empty array that was added at the start. I am able to append items within the prepare for segue bit and these transfer over but this is not what I want. I am very very new to programming and have searched about a lot but can't seem to find what I am looking for. Thanks in advance! Code looks like

Storyboard TableView with Segues to Multiple Views

落爺英雄遲暮 提交于 2019-12-18 17:30:11
问题 I am having an issue with designing a storyboard. I currently have an app in the app store that was designed with XIB files. I have a tableView placed on a UIViewController - not a tableViewController - that loads a unique viewController for each row that is selected. I am trying to convert this concept to a storyboard. I've done the following Place a UIViewController in the Storyboard. Place a UITableView on the UIViewController so I can customize the table view. I tried making connections

Make button it UIAlertView perform Segue

谁说我不能喝 提交于 2019-12-18 13:17:02
问题 I have created a UIAlertView for an action which gives me 2 options. I want the user to be able to click on a button and have it perform a Segue. Here's the code I have so far: - (IBAction)switchView:(id)sender { UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"Please Note" message:@"Hello this is my message" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Option 1", @"Option 2", nil]; [myAlert show]; } - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:

iOS segue freeze for many seconds before showing new view

会有一股神秘感。 提交于 2019-12-18 12:26:14
问题 In the main view of my app I have a table view and two prototype cells. I have configured the segues for each cell using the storyboard. In the view controller I override prepareForSegue to pass information on the selected cell to the destination view. The destination view isn't particularly complex and certainly doesn't require any heavy processing to load. THE PROBLEM When I tap on a cell in the main controller for the very first time, the destination view appears after a long delay, from 5

-segueForUnwindingToViewController: fromViewController: identifier: not being called

随声附和 提交于 2019-12-18 12:18:08
问题 I have created a custom segue that presents a view controller inside a container that is very similar with Apple's own modal view controllers (I've implemented it as a UIViewController subclass). I'm now trying to create a custom unwind segue but there's no way I can get the method -segueForUnwindingToViewController: fromViewController: identifier: to be called. I've also implemented -viewControllerForUnwindSegueAction: fromViewController: withSender: on my container so I can point to the

Getting reference to the view of a container view

心不动则不痛 提交于 2019-12-18 11:53:41
问题 I am new to iOS App Development. I have connected a tableview controller such that when I select one of the rows I get another UIViewController using didSelectRowAtIndexPath. I have a container view inside this UIViewController which displays (say for the time being) index of the row on which didSelectRowAtIndexPath was called. I want to do this using a segue, but the problem is I don't know how to get a reference to the view controller which is formed by using the container view. I know you

Perform Segue from another class with helper function

江枫思渺然 提交于 2019-12-18 09:51:03
问题 I have two classes, ChargeCustomer and TwelvethViewController . In TwelvethViewController I have a func goNextView() which should perform a segue to next view controller when called. goNextView() is called from class ChargeCustomer inside a Alamofire completion handler. The problem is that this function goNextView() is never called and I can't figure out why. I tried to make it work based on this answer on stackoverflow Perform Segue From Another Swift File via a class function class

Perform Segue from another class with helper function

青春壹個敷衍的年華 提交于 2019-12-18 09:50:35
问题 I have two classes, ChargeCustomer and TwelvethViewController . In TwelvethViewController I have a func goNextView() which should perform a segue to next view controller when called. goNextView() is called from class ChargeCustomer inside a Alamofire completion handler. The problem is that this function goNextView() is never called and I can't figure out why. I tried to make it work based on this answer on stackoverflow Perform Segue From Another Swift File via a class function class