segue

Application tried to present modally an active controller - crashing, why?

你离开我真会死。 提交于 2019-12-25 16:43:20
问题 Interesting that I don't present modally, but using segue: This how I trigger segue: _centerAndRightContainerViewController!.performSegueWithIdentifier("xxx", sender: self) Segue is set up in Interface Builder: And here is the container class implementation, but I don't think any wrong is with it, in iOS7 in old Xcode 5 I used several of segues: var _centerAndRightContainerViewController: CenterAndRightContainerViewController? = nil var _selectedCenterAndRightContainerViewController:

How to pass two textfield entries to another ViewController with using segue

痞子三分冷 提交于 2019-12-25 14:45:46
问题 I want my user to go to the TableViewController once they enter their "id" and "password" but when we use prepare and performsegue methods we just send one variable. @IBAction func logIn(_ sender: Any) { performSegue(withIdentifier: "emailSegue", sender: emailTextField.text) performSegue(withIdentifier: "passwordSegue", sender: passwordTextField.text) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { let guest = segue.destination as! ExpenseTableViewController guest

Short Term Memory Between VCs in Swift

耗尽温柔 提交于 2019-12-25 09:59:38
问题 The short version is: Do the values of a VC's variables stay in tact during the modal presentation and dismissal of another VC? When the second VC is dismissed, are the original VC's variables still equal to their last values? Details, If Needed I have a viewController where a table cell is selected. The contents of that cell are then pulled out and passed onto an editor viewController like this: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { //Segue to mainVC

Passing the “correct” Data from the selected cell in a UITableViewController to a ViewController

走远了吗. 提交于 2019-12-25 09:05:35
问题 I have a UITableviewController where I take a JSON file and break it down into various objects for display on my tableview (this works fine). I've also created variables to store certain information from the cells generated in the tableview to be passed on to a detailViewController (text and images). Using the 'prepare for segue' method I am able to pass the information I need to the detailViewController . However, I keep running into an issue where the data displayed in the

How can I segue between two xib files in xamarin?

亡梦爱人 提交于 2019-12-25 08:45:23
问题 I'm new to Xamarin and I'm working my way through an app. I'm also using mvvmCross. How can I segue between two views on button click? Normally I use storyboard so that's as simple as control+click and drag to hook it up. My second thought was to do something like: PerformSegue(identifier, sender); However, there's no way for me to set the identifier when i open the xib up to edit the interface. So I have two xib files, HomeView.xib and SecondView.xib. As well as two c sharp files HomeView.cs

Data transfer between two view controller

試著忘記壹切 提交于 2019-12-25 08:25:29
问题 i m pretty stuck on this one rite now let me explain the problem this way: Motor View Controller (table 1) Add New Motor (table 2) show motor Detail (View 1) edit Motor Detail (table 3) now what happens is i go to table 1 then click on add button then go to table 2 and add a new motor on table 1 when i click on row of table 1 i go to view 1 where my details are shown in the labels and wen i click the edit button on this view a edit screen pops up now when i edit here i wanna save these

Tab bar disappears after segue

元气小坏坏 提交于 2019-12-25 06:58:08
问题 Update: i hope this helps. a b c d are the buttons in the tabbar. viewcontroller1 is segued by b --> no tabbar. the same with viewcontroller2, which is segued from viewcontroller1 Tabbar Controller I I_____ a I I_____ b ---- viewcontoller1 I I I_____ c I__viewcontroller2 I I_____ d Ive searched for solutions, but no approaches helped me. In my app i have as initial view a tab bar controller. this tab bar has 4 views. I want to switch from one of these views to another view. Therefore im using

iOS Programmatically display a view controller based on current user

末鹿安然 提交于 2019-12-25 05:33:26
问题 I have a PreferencesViewController that shows information about current user: But it depends on the current user. If the user hasn't logged in yet, I am triggering a segue to LoginViewController on PreferencesViewController viewWillAppear method: The problem comes when the user hasn't signed in and taps again on the Preferences tab. It unwinds the segue back to PreferencesViewController , causing unexpected behaviour ( PreferencesViewController should only be rendered when the user has logged

passing ManagedObjectContext via prepareforsegue

天涯浪子 提交于 2019-12-25 05:24:06
问题 First of all, this is my basic setup. I'm trying to pass a NSManagedObjectContext (MOC) from my AppDelegate to the selected custom ViewController. First, in "AppDelegate.m", I do: UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController; FirstTableViewController *tableVC = (FirstTableViewController *)navigationController.topViewController; tableVC.managedObjectContext = self.managedObjectContext; to pass the MOC to the tableViewController which

iPhone [self performseguewithidentifier… ] is not showing the new view controller

邮差的信 提交于 2019-12-25 05:09:14
问题 I have been all over stackoverflow and all over Google and I cannot seem to figure this one out. Here's my scenario: I have my app's "main screen" where the user first makes decisions about what they're going to do. The app works off of a CoreData database which is created by "importing" XML files. The user can choose to open an XML file attached to an email in my application, which automatically triggers my main screen to show up and run the import of the file. I can get this far without any