segue

Swift link Image from Parse array using segues to secondViewController

北城余情 提交于 2019-12-02 05:54:27
Here is my code, i am trying to use the "prepareForSegue" function to send an image from tableViewController (firstViewController) to my detailedViewController (secondViewController). I have managed to populate my firstViewController from the parse cloud successfully and I have managed to get my secondViewController Labels to update, but i can not get the imageView to update. I have posted my code below firstViewController override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { let eventDetailVC: EventDetailsVC = segue.destinationViewController as! EventDetailsVC if let

Same view controller loads twice

浪子不回头ぞ 提交于 2019-12-02 05:46:52
I've read several posts on this issue but none of them solved my problem. I'm coding an app where I have to click on a button ("Prepare") to go to the following ViewController. When the button is clicked, it also passes data between the two view controller. The problem is, when I click the button, the following ViewController loads twice. Thus, if I want to go back I have to go back through two same ViewController. I've checked the segue, the class names and files names but nothing fixes it. I've also created a new project and rewritten all the code from the beginning but in the end, it still

How to execute button press action before prepareForSegue in iOS?

99封情书 提交于 2019-12-02 05:32:20
I am creating an iOS application in which I want to perform an assignment action in button press before running the method prepareForSegue. I created all controls using Main Story board. The order of execution for some buttons is button press action -> prepareForSegue but for some buttons it is prepareForSegue-> button press action How to change the order for second set of buttons? Here is the code I am using: import UIKit class SummaryViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func

Attempting to segue from Objective-C to Swift VC

烂漫一生 提交于 2019-12-02 03:51:31
i'm trying to segue from objective-c to swift. However when I try this using the object below I receive the following error I don't know what i'm doing wrong, i've setup the segue on the storyboard and assigned it to the same ID, created the prepare function and the perform. - (void)renderer:(id<SCNSceneRenderer>)renderer willRenderScene:(SCNScene *)scene atTime:(NSTimeInterval)time { // Look for trackables, and draw on each found one. size_t trackableCount = trackableIds.size(); for (size_t i = 0; i < trackableCount; i++) { // NSLog(@"this is the variable value: %d", trackableIds[i]); // Find

iOS App crashes at segue (breakpoint occurs at func prepareForSegue)

旧巷老猫 提交于 2019-12-02 02:44:49
Update: I figuire out, it's very hard to debug just by reading through the code, especially in a situation like this, https://www.dropbox.com/s/ty3clsvgednzevj/LoaferMap%20for%20iPhone%20copy%202.zip?dl=0 , so I upload my project to dropbox if you want to reproduce the bug. I deleted destination.delete(self), now it's gone. But the app still crashes. I realized the problem in SliderViewController maybe the code I wrote is simply unexcuteable. I'm a beginner, new to swift programming language. Your help means a lot to me. If you download my project, and look at it. My goal is actually pretty

iOS App crashes at segue (breakpoint occurs at func prepareForSegue)

我怕爱的太早我们不能终老 提交于 2019-12-02 02:23:49
问题 Update: I figuire out, it's very hard to debug just by reading through the code, especially in a situation like this,https://www.dropbox.com/s/ty3clsvgednzevj/LoaferMap%20for%20iPhone%20copy%202.zip?dl=0, so I upload my project to dropbox if you want to reproduce the bug. I deleted destination.delete(self), now it's gone. But the app still crashes. I realized the problem in SliderViewController maybe the code I wrote is simply unexcuteable. I'm a beginner, new to swift programming language.

Is there a way to avoid viewDidLoad beeing called after every segue?

痞子三分冷 提交于 2019-12-02 02:06:30
i initialize tables, data etc in my main ViewController. For more settings, i want to call another Viewcontroller with: DateChangeController *theController = [self.storyboard instantiateViewControllerWithIdentifier:@"dateChangeController"]; [self presentViewController:theController animated:YES completion:^{NSLog(@"View controller presented.");}]; And some clicks later i return with a segue (custom:) NSLog(@"Scroll to Ticket"); [self.sourceViewController presentModalViewController:self.destinationViewController animated:YES]; My Problem: After returning to my main ViewController, viewDidLoad

Perform segue after UIAlertController is dismissed

孤人 提交于 2019-12-02 01:52:39
问题 I've had similar problems in the past with UIAlertController in the sense that there's always a lag on the UI thread after the UIAlertController is dismissed. My problem right now is that I want to perform a segue if the user clicks on the "Okay" UIAlertAction and nothing happens if "Cancel" UIAlertAction is pressed. This is my code: // create the uialertcontroller to display let alert = UIAlertController(title: "Do you need help?", message: "Would you like to look for a consultant?",

didSelectRowAtIndexPath and segues

孤人 提交于 2019-12-01 22:36:44
问题 I am working with Storyboard. I am in doubt regarding the use of segues when pushing a new UItableViewController onto the navigation stack. How to do it right? No segue when the push results from a tap in a cell and just use didSelectRowAtIndexPath? Please share your opinion. 回答1: You do not mention it at all, but judging by your mention of a segue you are using storyboarding. When using storyboarding there is a new way to show a new view controller. By connecting a UITableViewCell using a

unwind segue not triggering

时光总嘲笑我的痴心妄想 提交于 2019-12-01 21:17:13
问题 I have been learning swift and have made the foundation of most of my app. I have the following storyboard app storyboard Everything works fine. For example, I have an unwind segue on the add course view controller that triggers when you press save and you are returned to the 'your courses' view controller. When you are on the my courses view controller, you can select a course and the topics are displayed, you can then select a topic and you are taken to an update score view controller, this