In order to use an unwind segue, you start by setting up a method in the destination view controller. @IBAction func unwind(segue: UIStoryboardSegue) { // unwind } Note, that this method is placed in the destination view controller. The view controller being unwound to. From here, we need not the...
objective-c,segue,viewcontroller
OK, what you are doing here is bypassing the segue completely. You need to do something like this... - (IBAction)Akkoord:(id)sender { [self performseguewithidentifier:@"nextcontroller"] } This is all you need to do. The segue will then create the nextController for you and then the code inside prepareForSegue will pass the variables...
I don't believe there is a built in method for achieve that, however you could use Custom Transitions, which were introduced in iOS7. There are plenty of great tutorials out there, I've added some links below and some sample code demonstrating how you could slide the new view controller down...
iphone,swift,uiviewcontroller,ios8,segue
So instead I was thinking to have a value associated with each button in the first view, have it sent to the second view via a segue, and then sent again to the third view and tell it to use the proper segue to the proper third view Controller...
ios,objective-c,uiviewcontroller,segue
Why don't you give each one a storyboard identifier, then grab anyone you need with its identifier using this: UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"identifier"]; Then present this view controller via push or present modally...
You should pass a the string in prepareForSegue function rather than didSelectRowAtIndexPath function. Instead of using didSelectRowAtIndexPath as below: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "ResultSegue" { if let indexPath = self.tableView.indexPathForSelectedRow() { var card: String if (tableView == self.searchDisplayController?.searchResultsTableView) { card = self.filtered[indexPath.row] } else...
ios,xcode,swift,sprite-kit,segue
Of course it will memory leak. override func viewDidLoad() { navController = self } You just gave yourself a reference to itself. Usually when your vc goes offscreen, the view hierarchy no longer holds the view so the view is deinited. You set a reference to itself so whatever you...
ios,uitableview,segue,viewcontroller
A segue will be performed automatically while a cell is tapped. Try the following code: // - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath // { // self.selectedIngredient = self.selectedProduct.ingredientsArray[indexPath.row - 3]; // [self performSegueWithIdentifier:@"ingViewSegue" sender:self]; // NSLog(@"selected ingredient %@", self.selectedIngredient); // } #pragma mark segue - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { NSIndexPath *indexPath...
ios,swift,segue,watchkit,apple-watch
Building my first Apple Watch app over here :) Looks like there is a concept of UINavigationController-ish behaviour built into the WKInterfacesController. Take a look at: pushControllerWithName(_:context:) And from some docs I found here: Hierarchical. This style is suited for apps with more complex data models or apps whose data...
ios,objective-c,segue,viewcontroller
You need to use -prepareForSegue to manage this situation, and you'll need an iVar to keep the restaurant name. So in the top of your map's .m file, add an ivar NSString @implementation yourViewController{ NSString *sRestName; //This is empty until the user selects a restaurant } -(void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view...
Use [UIView setUserInteractionEnabled: NO] on the background view when the modal view is presented.
ios,swift,parse.com,segue,uistoryboard
Just looking at your code, and knowing nothing else about your situation, I would guess that holder is nil. That would certainly be a reason by "nothing happens". You can easily test that with another println statement.
ios,swift,uiview,uibutton,segue
button.addTarget(self, action: "buttonAction:", forControlEvents: UIControlEvents.TouchUpInside) button.addTarget(self, action: "saveButton:", forControlEvents: UIControlEvents.TouchDown) The normal thing is that the button should be sending messages to its view controller. That is the standard MVC thing to do - indeed, that is the VC in MVC (the View is letting the Controller know there has...
objective-c,xcode,uiviewcontroller,segue,viewcontroller
It is not recommended to add delay for waiting an operation to be done (i.e. the login), instead you can use Grand Central Dispatch dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){ //Background Thread // do you login logic here dispatch_async(dispatch_get_main_queue(), ^(void){ //Main Thread : UI Updates UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; UIViewController...
ios,networking,segue,lifecycle
You display whatever info you have in the viewDidLoad. Ideally you can have "Load More" button, which will further make the 2nd API call and update the view with fetched info. If you want to make the 2nd API call automatically, just go ahead and add it in the viewDidLoad...
Are you using show or show detail segue? It seems like you are using a modal segue. Destination view controller for show or show segue is usually the second view controller itself, and not embedded in another UINavigationController. If you're destination view controller for the show segue is really a...
It seems that you don't have any data to display in your array explanation, try to fix using this: if let i = self.tableView.indexPathForSelectedRow()?.row { if i <= explanation.count{ destination.explanation = explanation[i] <-- ERROR HERE } else { println("No explanationto display") } } However I would suggest you to use...
@Garret, @rdelmar, @syed-tariq - thank you for pointing me into the right direction. It turned out that Unwind Segue got me on track: Xcode Swift Go back to previous viewController (TableViewController) But I also found one error I was doing in my storyboard, as I had Navigation Controller on all...
ios,objective-c,iphone,segue,nsnotificationcenter
Found it: the problem was that the controller kept "listening" even when there was a failed message being sent because of the [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(logInAttemptComplete:) name:@"logInNotification" object:nil]; being inside the function of pressing the log in button. All I had to do was add the [[NSNotificationCenter defaultCenter] removeObserver:self name:@"logInNotification"...
osx,swift,segue,viewcontroller
Let assume that in your first ViewController you have one label and one button. When pressed, that button open popover (SecondViewController) with one textfield (and one button what says ready or close etc.), where you want take its value and assign it to your label. That is where delegates and...
ios,swift,uiviewcontroller,segue,uipageviewcontroller
Embedding is actually a kind of segue that takes place as soon as the containing controller is instantiated, so the way to do this is to implement prepareForSegue on your containing controller, and capture a reference to your child controller within that method. Here's an example adapted from a project...
Your ViewController has to be in a UINavigationController for it to work as a push. To do this, select your ViewController with the TableView and select Editor->Embed In->Navigation Controller from the menu at the top. As you noted, the UITabViewController isn't your issue, but you shouldn't segue to a UITabBarController....
ios,xcode,uitableview,swift,segue
I have some problem and I guess that is Xcode's bug. My solution is to download and use Xcode 6.1.1 instead 6.2. P.S. In my case this problem happened just when segue is assigned to UIBarButtonItem. So, and after I'm relaunching Xcode popover segue is changed back to push segue....
ios,objective-c,uitableview,segue
You should delete the button's action method, and connect the segue directly from the button to the next controller. In prepareForSegue, you can pass the button's origin, after converting it to the table view's coordinate system to the indexPathForRowAtPoint: method to get the indexPath of the cell that button is...
I don't believe it's possible to do this without code as of Xcode 6.3. However to use adaptive size classes rather than user interface idioms, your comment above could be written like this: if (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassCompact) { [self presentViewController:vc animated:YES completion:nil]; } else { [vc setPreferredContentSize:CGSizeMake(340, 560)]; [vc setModalPresentationStyle:UIModalPresentationFormSheet];...
i set up a quick demo project with the following viewcontrollers: class MainViewController: UIViewController { @IBOutlet weak var label: UILabel! @IBAction func unwind(segue: UIStoryboardSegue) { println("unwinding") if let sourceViewController = segue.sourceViewController as? ModalViewController { label.text = sourceViewController.selectedText } } } tapping on the label results in the modalviewcontroller to show....
ios,objective-c,uicollectionview,segue
it has to be row instead of section in your prepareforsegue: destViewController.ID = [[_jsonArray objectAtIndex:indexPath.row] valueForKey:@"imagen"]; and btw: you can easily get the indexpath doing the following: NSIndexPath *selectedIndexPath = [self.collectionView indexPathForCell:sender]; ...
ios,swift,segue,uialertcontroller
You would simply specify a different identifier, depending on which view controller you are unwinding to. Your AlertController would specify the correct identifier, depending on whether the user had logged out (unwind to login), or not (unwind to previous view). If you need to pass additional information, you can set...
ios,objective-c,swift,storyboard,segue
What the show (e.g. Push) segue does internally is to call -[UIViewController showViewController:sender:] Calling this method on your view controller itself, will trigger the appropriate way of presenting the view controller you are passing. // Swift self.showViewController(viewControllerToShow, sender: self) // Objective-C [self showViewController: viewControllerToShow sender: self]; The animation can be...
ios,objective-c,exception,uinavigationcontroller,segue
You only need one Navigation Controller in any app which loads at launch time and will handle navigating the full stack of view controllers for you. It needs to be the root view controller, with the "Is Initial View Controller" box checked (under Attributes Inspector, View Controller) to give it...
objective-c,xcode,uiviewcontroller,segue
You can use [viewController presentViewController:anotherController animated:YES completion:nil]; to present the view controller modally. Another alternative is to use a UINavigationController and do [viewController.navigationController pushViewController:anotherController animated:YES]; The second method will only work if viewController is in the stack of a navigationController...
ios,mysql,objective-c,xcode6,segue
Okay -- here's a quick response to get you started. In your TopicViewController.h (the header) add: @property (nonatomic, retain) NSString * rID; @property (nonatomic, retain) NSString * rTopic; @property (nonatomic, retain) NSString * rDate; @property (nonatomic, retain) NSString * rContent; @property (nonatomic, retain) NSString * rBy; Change your CatViewController.m prepareForSegue...
ios,arrays,swift,uibutton,segue
You should check your index against count - 1 because index is zero-based. if currentQuestionIndex < questions.count - 1 && currentPlaceholderIndex < placeholder.count - 1{ currentQuestionIndex++ currentPlaceholderIndex++ buttonLabel.setTitle("Next", forState: UIControlState.Normal) } else { performSegueWithIdentifier("countdownSegue", sender: self) } EDIT: You didn't check the index when getting values from your array to...
Check that there isn't an old connection from your button by right clicking on it in the storyboard and examining the outlets in the list. You may have an old connection that you forgot to eliminate.
Just the way you did it. If you are asking, how can I derive different strings from different buttons, the easiest way is to have different handlers that set a local variable, which is then proxied to the next VC as you have done. That is the most straight forward...
Please check some attached images. It may help you to understand delegate if you not already aware of it. Attached first image is for segue and second for delegate. Segue Result ...
You are actually close. Just a minor change to your performSegue: func performSegue(sender: UIButton) { if sender.description == wordTested { self.performSegueWithIdentifier(identifier: "segueToAnswerCorrect", sender: sender) } else { self.performSegueWithIdentifier(identifier: "segueToReviewCard", sender: sender) } } You then connect all of the 4 buttons to this function. Then you change the prepareForSegue: override...
ios,uitableview,swift,uisearchbar,segue
I fixed this issue by dropping the entire UISearchDisplayController and implementing a UISearchController instead. Turns out the UISearchDisplayController was showing as deprecated in the latest Xcode beta build anyway....
If I understand your question correctly, you should do something like this: class MyPickerController : UIViewController { @IBOutlet weak var myLabel: UILabel! var pickerData:[String] func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { myLabel.text = pickerData[row] performSegueWithIdentifier( "mySegueName", sender: self ) } func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if...
ios,swift,uiviewcontroller,segue
It looks like you are running a while loop on the main thread which is also the thread responsible for drawing the UI. As long as that thread is stuck in your while loop there's no way for it's run loop to continue and no opporunity for it to update...
ios,swift,segue,uistoryboardsegue
You can initiate nextview programetically this way: let storyboard = UIStoryboard(name: "Main", bundle: nil) let vc = storyboard.instantiateViewControllerWithIdentifier("someViewController") as! UIViewController self.presentViewController(vc, animated: true, completion: nil) ...
.indexPathForSelectedRow() returns an optional. You have to unwrap it, before you can access its properties. Try: let selectedIndexPath = popularTableView.indexPathForSelectedRow() detailsViewController.shots = shots[selectedIndexPath!.row] (see the exclamationmark)...
I'd like to suggest to you to use the delegate method to handle item selection: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Here you can do something with, e.g. push a view controller: id vc = [self.storyboard instantiateViewControllerWithIdentifier:@"myVC"]; [self.navigationController pushViewController:vc animated:YES]; } In most cases it is more comfortable to...
Your prepareForSegue(_:sender:) method is embedded within your alertView(_:clickedButtonAtIndex:) method. While this is legal in Swift, UIKit won't call this method. It needs to be a method within your view controller subclass (like your alertView(_:clickedButtonAtIndex:) method). You may want to review some of the documentation on Xcode debugging; I think setting...
ios,swift,uiviewcontroller,segue,rightbarbuttonitem
Create a segue from the controller (the one with the bar buttons) to the controller you want to segue to when the search button is touched. Call performSegueWithIdentifier:sender: in the "activate search" action method.
ios,xamarin,monotouch,storyboard,segue
Right click the storyboard and open it up in Source Code Editor. Check that the XML matches up correctly, and identify the segues that you can't see....
You can implement the UIPickerViewDelegate and UIPickerViewDataSource protocols to get data from the picker view. If you're just using it as an input for a text field, you can simply just set textField.inputView = pickerView instead of having the picker view on another controller....
core-data,segue,viewcontroller
Your table view controller can keep a reference to the newly created object. Insert the object (trial) in the original view controller and pass it on to the next controller in prepareForSegue. So the CreateTrialViewController starts out with a blank object to which the table view controller has a reference....
ios,xcode,swift,uiviewcontroller,segue
SOLUTION: Added to "Copy Bundle Resources" and then my VC was immediately recognized by the compiler....
Change to override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue is CustomOpenSegue { let customOpenSegue = segue as! CustomOpenSegue customOpenSegue.iconFrame = sender!.view!.frame } } If you override a method, you can't change the parameter types....
ios,swift,uitableview,uibutton,segue
Solved. I passed the index via UIButton option tag and replaced the indexPathForSelectedRow.
ios,objective-c,uitableview,segue
I wonder why your data source is different in cellforrow and prepare for segue. If you manage the same way as sections and rows. You need to get data from datasource firstly by indexpath.section and then indexpath.row change this in prepareforsegue method.
Yes, it always will create a new instance. have no doubt for that. Because that command equal to create a new object and push it (or present it). there's a lot of way to walkthrough it. In my case, i usually create questionViewController with an button, and by that button,...
I will suggest not to create segue(s) from cell or any object(like button). Create segue from one ViewController to OtherViewController with unique identifier. And then call the performSegueWithIdentifier yourself using the identifier.
ios,objective-c,storyboard,segue,uistoryboardsegue
There are numerous ways you could add a "nice animation". Here is an example of a sort of card shuffle animation where one view moves up and left, while the other moves down and right, then reverses after changing the z-order of the two views. This implementation inserts the destination...
you can use dynamic popup views like that let vc = storyboard.instantiateViewControllerWithIdentifier("myPopupView") as! myPopupViewViewController self.presentViewController(vc, animated: true, completion: nil) ...
uitableview,swift,segue,accessoryview
A segue is not only the simplest way to accomplish this, you can also take advantage of an unwind segue to automatically return your edited values. No delegation needed. No custom code to add hidden views to your cell. If you only have one segue, add it to the row,...
ios,swift,uiviewcontroller,delegates,segue
You are currently calling sendName and sendImage delegates before assigning them any value . Thats why they are not getting to your InformationViewController. You should do something like that: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "newReciep" { var vc = segue.destinationViewController as! DetailsViewController vc.delegateDetails = self...
ios,objective-c,swift,segue,unwind-segue
Yes, you can do this without having a segue from each controller, but it depends on how your controller hierarchy is set up. If for instance, you have a navigation controller, and all your view controllers are pushed onto its stack, you can create one segue from the navigation controller...
After developing extensively with WatchKit, I can tell you they aren't. WatchKit doesn't use a traditional navigation controller.
swift,segue,mpmovieplayercontroller
Tell your video to stop before segueing to the next view controller. override func prepareForSegue(segue: UIStoryboardSegue?, sender: AnyObject?) { objMoviePlayerController.stop() } MPMediaPlayback Protocol Reference...
You can send indexPath of your selected cell as sender object in performSegueWithIdentifier method since you are not using it at all. Then in prepareForSegue unwrap and cast sender to NSIndexPath and use it to pass data to next controller func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { var sound =...
ios,swift,cocoa-touch,containers,segue
I solved the problem by removing the child view which has already created at the first start.. @IBAction func insertButton(sender: AnyObject) { if (shiftNo != 3) { shiftNo++ } else { shiftNo = 1 } var childView = self.childViewControllers[0] as! UIViewController childView.willMoveToParentViewController(nil) childView.view.removeFromSuperview() childView.removeFromParentViewController() performSegueWithIdentifier("container", sender: self) } ...
First way is to use prepareForSegue and declare in it all your delegate methods. Second way is to use NSNotificationCenter and with this transfer your delegate so this works with pushToViewController...
ios,uitableview,swift,uicollectionview,segue
You should set up segues in the Interface Builder but not from a button but from a view controller and set appropriate identifiers. Use this method to start a segue: - performSegueWithIdentifier:sender: ...
ios,objective-c,uiviewcontroller,segue
It looks like you add it to UINavigationViewController stack, try this: - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"showClue"]) { UINavigationController *dest = (UINavigationController *)segue.destinationViewController; ClueDetailViewController *viewController = (ClueDetailViewController *)dest.topViewController; viewController.testString = @"This is a test"; // causes runtime crash } } ...
ios,objective-c,uitableview,segue,detailview
You can get the currently selected cell and pass the values in the prepareForSegue: method. -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { UIViewController *destinationViewController = segue.destinationViewController; UITableViewCell *selectedCell = [self.tableView cellForRowAtIndexPath:self.tableView.indexPathForSelectedRow]; destinationViewController.title = selectedCell.textLabel.text; //Add code to set label to selectedCell.detailTextLabel.text } ...
It is this method initWithCoder I think this solution is better You write some common code in -(void)setUp{ //Set up } Then you put this code in every initMethod: -(instancetype)initWithCoder:(NSCoder *)aDecoder{ if (self = [super initWithCoder:aDecoder]) { [self setUp]; } return self; } -(instancetype)init{ if (self = [super init]) {...
The prepareForSegue: method is called before tableView:didSelectRowAtIndexPath: method.And I saw that you only assign selectedName in method didSelectRowAtIndexPath.So selectedName will always be nil in prepareForSegue. You can assign selectedName in tableView:willSelectRowAtIndexPath: override func tableView(tableView: UITableView, willSelectRowAtIndexPath indexPath: NSIndexPath) { let row = self.tableView.indexPathForSelectedRow()!.row println("row \(row) was selected") selectedName = people[indexPath.row]...
objective-c,osx,cocoa,segue,nscollectionviewitem
Storyboards are relatively new to OS X. NSCollectionView seems to not get much love from Apple. There have been numerous reports that the combination of NSCollectionView and storyboards is buggy. So, you may be better off doing this the non-storyboard way. It may be simplest to connect the button to...
sprite-kit,segue,identifier,swift2,ios9
Segue identifiers are String objects, so you should call performSegueWithIdentifier with "push" instead of referencing it as a variable. This code should work: func segue(){ self.viewController.performSegueWithIdentifier("push", sender: viewController) } ...
ios,objective-c,core-data,segue
In this line CGPoint point = [sender convertPoint:CGPointZero toView:self.tableView]; you’re calling convertPoint:toView: on your SavedPOITableViewController, but this isn’t a method of your view controller, it’s a method of the view. Try this instead: CGPoint point = [self.view convertPoint:CGPointZero toView:self.tableView]; ...
I suppose this was pretty obvious, but my update was getting called every second... because i told it to. And I put my performSegueWithIdentifier inside it. So, easy fix. var segueFlag = false func update() { countdownLabel.text = "\(count)" if count == 0 { timer.invalidate() if segueFlag == false {...
ios,swift,segue,uistoryboardsegue,unwind-segue
Created Sample code for unwind segue with above transition animation code. Checkout SampleUnwind project that will help you to understand unwind segue(and how simple it is). In project there is one navigation controller and inside it there are three view controller (Home->First->second). In Home controller following unwind action is created,...
you can try this if([sender isKindOfClass:[MyViewControllerClass class]){ //do stuff } ...
ios,swift,segue,viewcontroller
Here is some example code to implement a main controller segueing to a second VC, and the second unwinding to the main controller. Notice that in the function the second cVC unwinds to, you can refer to the second controller and access a variable in the second controller. If you...
ios,swift,xcode6,uicollectionview,segue
You need to add the UICollecitonViewDelegate func collectionView(collection: UICollectionView, selectedItemIndex: NSIndexPath) { self.performSegueWithIdentifier("showDetail", sender: self) } After that add override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "showDetail" { if let indexPath = self.collectionView?.indexPathForCell(sender as! UICollectionViewCell) { let detailVC = segue.destinationViewController as! DetailMenuViewController detailVC.picFood = self.collection[indexPath.row] } }...
You are calling dequeueReusableCellWithIdentifier this gives you a new cell, if you want to access the values in that cell you need to access the data source for the cell in question as in the code below: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "identifierDetail" { if...
ios,xcode,swift,segue,unwind-segue
Your initial position for the destination vc's view is setup incorrectly (assuming that you want the view to move in from the right); you have it positioned below the screen, instead of to the right of the screen, secondVCView.frame = CGRectMake(0.0, screenHeight, screenWidth, screenHeight) This should be, secondVCView.frame = CGRectMake(screenWidth,...
If you check the docs for WKInterfaceController, you'll see there's no API to accomplish what you're looking for: https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WKInterfaceController_class/ The best you can do is change the text of the title/button or adjust the tint color....
ios,swift,uiviewcontroller,segue
Your code doesn't work because you need to setup a segue in storyboards with a specific ID that you pass as an argument when you call performSegueWithIdentifier. So, in your case, you need to create a segue with ID "SegueID", since that is the string that you are passing to...
You should be using the didSelectRowAtIndexPath method to determine whether or not a cell was selected. func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { self.performSegueWithIdentifier("showQuestionnaire", sender: indexPath); } Then in your prepareForSegue method override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) { if (segue.identifier == "showQuestionnaire") { let controller = (segue.destinationViewController as! UINavigationController).topViewController...
ios,uitableview,swift,segue,uistoryboardsegue
Embed the TableViewController inside the NavigationController. Not the DetailViewController directly. Check out the screenshot. Make sure, that the segue, connecting your TableViewController and your DetailViewController is of type Show (e.g. Push). You have to literally push a new View on top of the Navigationstack. ...
You've got prepareForSegue as an nested function inside nextPage. Move it outside and it should work fine: @IBAction func nextPage(sender: AnyObject) { self.performSegueWithIdentifier("answerSummary", sender: sender) } override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) { if let answerSummary = segue.destinationViewController as? QuizResultsViewController where segue.identifier == "answerSummary" answerSummary.answers = finalResultsSegue } } The...
ios,uitableview,swift,segue,tableviewcell
Your issue is that you're not passing any information to your detailViewController about the contents of the selected cell. Do this instead: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if ( segue.identifier == "toInfo") { if let indexPath = tableView.indexPathForCell(sender as! UITableViewCell) { var detailsVC = segue.destinationViewController as! DetalisTableViewController println(thecourseName[indexPath.row])...
swift,button,uiviewcontroller,segue
You cannot call other view from showInView, you need to dismiss the popOver and call the mainView from GameScene, to do so you can create a competition handler in your PausePopup or a protocol to pass the result of your popOver to GameScene deal with the result
Drag a segue from view controller1 to view controller2,not from any button Set a identifier of your segue Use this function to fire a segue. self.performSegueWithIdentifier("youridentifer", sender:nil); ...
There are different ways to approach this. One way is to replace the initial presenting view controller with the desired underlying one when you present the modal view controller. NSArray * viewControllers = [self.navigationController viewControllers]; [viewControllers replaceObjectAtIndex:viewControllers.count - 1 withObject:replacementController]; Dismissing the modal will simply show the different underlying view...
Instead of using UIButton.self as sender, use sender. And you can't use a closure with performSegueWithIdentifier: performSegueWithIdentifier("addMapItem", sender: UIButton.self) { // Some code } use: performSegueWithIdentifier("addMapItem", sender: sender) and my guess is you forgot to add self in this line: destination.savedItems = annotations // Should be self.annotations This is where...
storyboard,segue,watchkit,uistoryboardsegue,apple-watch
Page-based navigation and hierarchical navigation are exclusive – you can't mix and match unless you present a new interface modally. This is expected behaviour.
swift,uiviewcontroller,uitabbarcontroller,segue,xcode6.3
Yes, u can hide UIViewController. As your UIViewController is nothing but the a normal UIView. So just create an @IBOutlet for you UIView and use .hidden method like this @IBOutlet weak var mainview: UIView! override func viewDidLoad() { super.viewDidLoad() mainview.hidden = true } Edit: Correctly specify what you want to...