uistoryboardsegue

Perform segue after Login successful in Storyboards

偶尔善良 提交于 2019-11-26 18:29:59
问题 I have 2 UITextFields , one of them for Login and the another for the Password. Only if the Login is "succesful", I want to perform the Segue with Push to another View Controller . But when I touch the button, directly the View push to the Another View without check the Condition. In StoryBoard I drag from the UIButton to the View Controller I want to push, for creating the segue with push option. Here is my code: - (IBAction)buttonLogin:(id)sender { if (([self.textFieldLogin.text

Embed a UIViewController in a NavigationController using segues

随声附和 提交于 2019-11-26 17:47:05
问题 I have a viewController that is usually (most often) accessed by using a push segue. This viewController needs to be embedded in a UINavigationController. So typically, this is no problem. The push segue manages pushing the viewController, and therefore the viewController has it's UINavigationController. My issue is that in a few cases, I'd like to present this same exact viewController using a modal segue. When I do this, the viewController is not embedded in a navigationController. Is there

Prepare for Segue in Swift

梦想的初衷 提交于 2019-11-26 17:35:39
I'm facing the error message: "UIStoryboardSegue does not have a member named 'identifier'" Here's the code causing the error if (segue.identifier == "Load View") { // pass data to next view } On Obj-C it's fine using like this: if ([segue.identifier isEqualToString:@"Load View"]) { // pass data to next view } What am I doing wrong? This seems to be due to a problem in the UITableViewController subclass template. It comes with a version of the prepareForSegue method that would require you to unwrap the segue. Replace your current prepareForSegue function with: override func prepareForSegue

Pass data between ViewController and ContainerViewController

半腔热情 提交于 2019-11-26 16:43:07
问题 I'm working on an app, and need to pass data between view and containerView. I need to send data and receive data from both Views. Let me explain better: I can change the Label Master (Touch the Container Button) by protocol , but I can not change the Label Container (Touch the Master button). What happens is the Master connects with the container by a following. But do not have a follow Container linking to the Master. I tried to add but segue to, but it worked. The Master View Controller:

Does anyone know what the new Exit icon is used for when editing storyboards using Xcode 4.5?

拥有回忆 提交于 2019-11-26 15:12:50
问题 Right-clicking the Exit icon yields an empty window. Can't Ctrl-drag a connection to any IB elements or corresponding source files. Docs give no love. Doesn't appear in nib files, only storyboards. My assumption is that it's a corollary to segues, but I don't see any new methods to back it up. Anyone? 回答1: There's a lot of information in the WWDC video "Session 407 - Adopting Storyboards in your App." Say you have two view controllers linked by a segue. Implement the following exit action on

iOS 9 Segue Causes App To Freeze (no crash or error thrown)

依然范特西╮ 提交于 2019-11-26 12:29:53
问题 I have been working on this app for months now and from as far back as I can remember I have never had an issue with segues. The code is unchanged in terms of calling performSegueWithIdentifier but since my recent update to Xcode 7 and iOS 9 I have not been able to tack this issue. I have tried: Deleting button and creating new button w/ segue link Using a direct segue from button to view, without the use of performSegueWithIdentifier Connecting button to new blank viewController When I press

NSInvalidArgumentException - receiver has no segue with identifier

三世轮回 提交于 2019-11-26 12:28:10
问题 I have been trying everything for hours, and nothing\'s worked. I am trying to segue between two view controllers, from one tableViewController to another tableViewController. The segue is hooked up to the top level view, not the tableviewcell. The identifier that was set in Xcode is identical to the one used in the code (copy and pasted). It was working fine last night, but now i can\'t seem to get it to segue without crashing. here are the methods in which the segue is called - (void

&#39;Receiver (<ViewController>) has no segue with identifier &#39;addSegue&#39;

穿精又带淫゛_ 提交于 2019-11-26 06:48:24
问题 I have a navigation controller that has a segue links between them called \"addSegue\". When I click on the tableView cell though the app crashes and I get the error below: Terminating app due to uncaught exception \'NSInvalidArgumentException\', reason: \'Receiver (<MSAddFriendsViewController: 0x98cc340>) has no segue with identifier \'addSegue\' I don\'t think that I have any issues with my code. Here is the method in which I have the line showSegueWithIdentifier : - (void)tableView:

How do I create a segue that can be called from a button that is created programmatically?

风格不统一 提交于 2019-11-26 06:38:08
问题 In Swift I have a button created programmaticaly using: var button = UIBarButtonItem(title: \"Tableau\", style: .Plain, target: self, action: \"tabBarTableauClicked\") I want that when the user clicks the button it changes viewControllers. Here is the code for tabBarTableauClicked : func tabBarTableauClicked(){ performSegueWithIdentifier(\"tableau\", sender: self) } But it is obviously not working because there is no segue with an identifier called \"tableau\". And I can\'t create a segue

Prepare for Segue in Swift

拟墨画扇 提交于 2019-11-26 05:31:53
问题 I\'m facing the error message: \"UIStoryboardSegue does not have a member named \'identifier\'\" Here\'s the code causing the error if (segue.identifier == \"Load View\") { // pass data to next view } On Obj-C it\'s fine using like this: if ([segue.identifier isEqualToString:@\"Load View\"]) { // pass data to next view } What am I doing wrong? 回答1: This seems to be due to a problem in the UITableViewController subclass template. It comes with a version of the prepareForSegue method that would