segue

Multiple segues not passing Object data between themselves

走远了吗. 提交于 2019-12-13 06:48:24
问题 I have started a project that was initially completed following Appcoda's tutorial about using view controllers to pass data between scenes (Find it here: http://www.appcoda.com/storyboards-ios-tutorial-pass-data-between-view-controller-with-segue/) Basically it takes table data from the first scene and the segue connects to another controller that displays the recipe image, prep time, and ingredients. However I wanted to take it one step further and add another view controller that will show

Run method when viewcontroller is accessed from another vc being dismissed

被刻印的时光 ゝ 提交于 2019-12-13 05:38:54
问题 Let's say I have my initial vc called VC1, then I have a second one called VC2. VC1 has a segue to VC2, on VC2 there is a button that will dismiss VC2 and then show VC1. Once VC1 loads I want to run a method but I can't do that in view did load so where can I do it? [VC1] -> [VC2] 回答1: You can use a delegate method to achieve this. In the method you call to dismiss VC2 call the delegate. You can implement this delegate in VC1. 回答2: You can also try Unwind Segue for dismissing the VC2 and call

Segue is blank (black) , can't view the data

99封情书 提交于 2019-12-13 05:34:06
问题 (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"DetailPlacePage"]) { NSIndexPath *indexPath = [self.Allplace indexPathForSelectedRow]; NomadPlaceDetailViewController *placedetailcontroller = segue.destinationViewController; placedetailcontroller.myDictionary = [self.placeArray objectAtIndex:indexPath.row]; } } This is the code I use to prepare segue for UIviewcontroller. Can't see the next view controller , screen gets blank and

Unbalanced calls when performing a custom segue

断了今生、忘了曾经 提交于 2019-12-13 05:17:14
问题 I've created a custom segue which is a reversed version of a vertical segue, here is my perform function: var sourceViewController = self.sourceViewController as UIViewController! var destinationViewController = self.destinationViewController as UIViewController! sourceViewController.view.addSubview(destinationViewController.view) destinationViewController.view.frame = sourceViewController.view.frame destinationViewController.view.transform = CGAffineTransformMakeTranslation(0,

UITableViewDelegate cellForRowAtIndexPath not called

江枫思渺然 提交于 2019-12-13 04:48:47
问题 I have a table view controller with a tableview that I set up in the storyboard with a push segue to it from the mapViewController. When the user touched the ios provided annotation callout the function calloutAccessoryControllTapped is called, and it indirectly by way of a notification called [self performSegueWithIdentifier:@"SequeToConversationList" sender:self]; This works fine. However, I replaced the ios supplied callout with a custom callout layed out in a XIB. It has a button with an

MFMailComposeViewController setToRecipients append String from settings textField trouble

冷暖自知 提交于 2019-12-13 04:33:48
问题 Hopefully this is a simple issue? But I just cant seem to get my head around it. I have a text field in my settingsViewController called emailText where I want to set the default email recipient. @IBOutlet weak var emailText: UITextField! override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { let shoppingListViewController = segue.destinationViewController as! ShoppingListViewController shoppingListViewController.emailString = ([emailText.text]!) } func

UIButton and the order of IBAction and segue

喜夏-厌秋 提交于 2019-12-13 04:08:15
问题 Suppose that I have a UIButton control and I attached both the @IBAction method on the click and segue to it. Is it guaranteed that the click method will bed called before the segue? Thanks in advance. 回答1: Do this, this will work perfect in your case.. In your first ViewController.h create a property to store indexPath @property (nonatomic,strong) NSIndexPath *indexPath; In your second ViewController.h create a property to store indexPath @property (nonatomic,strong) NSIndexPath *indexPath;

Passing variables between view controllers using segue

狂风中的少年 提交于 2019-12-13 04:04:07
问题 I've been trying to pass variables between view controllers without much luck. I started to work backwards from the problem I was encountering but am now having problems just getting the segue to action. Whether I perform the segue with identifier method or have it actioning from the button I am using to perform a calculation I get the below error in the debugger. Any help would be appreciated. 2014-02-14 13:59:58.795 BatteryCalculator[6944:70b] Cannot find executable for CFBundle 0x8dbd110 <

Add Swipe Gesture to display the next Item in the Detailed View - Revised

人走茶凉 提交于 2019-12-13 03:59:10
问题 This is my previous question Add Swipe Gesture to display the next Item in the Detailed View I have asked this question before but not sure how to update it with my progress. I followed some suggestions but now I am stuck again. I want to now add a swipe gesture to the destination view controller so that I can get to the next article without having to go back to the main page. I have added the following to set up the gesture as well as a function to load the items in the array. All this data

Unwind Segue Hides Tab Bar

廉价感情. 提交于 2019-12-13 03:57:37
问题 I have the following layout : Tab Bar Controller Nav Controller View Controller 1 View Controller 2 I am currently trying to unwind segue from View Controller 2 to View Controller 1. The segue works however the tab bar disappears. Is there any way where I can force the tab bar to remain without removing the navigation controller. I have already tried the follow: setting the tabBar.isHidden property to false unchecking the hide bottom bar on push Any other ideas? Any help will be greatly