I'm developing the first tutorial using the story board I need that I have two text fields and a button When I click on the button, if text fields are not empty I want to navigate V1Controller in V2Controller. For this I am pulling from V1Controller into V2Controller and giving the style "Model" in the storyboard and my identifier "DestinationView" . Here I am writing code in V1Controller on the button
if (! UserField.text.length == 0 & passwordfiled.text.length == 0} {[self performSegueWithIdentifier: @ "Destination View" Sender: Self];} - (Zero) Ready FORSegue: (UIStoryboardSegue *) Segu Sender: (ID) Sender {if ([[Identifier identifier] is EQUALToString: @ "DestinationView"]) {Second View Controller * SVC = segue.destinationViewController; [Self-Current ViewController: Animated SVC: Yes Complete: Zero];}}
When I click on the button the app crash Is suffering and is giving low rebate:
'NSInvalidArgumentException' due to cancellation of 'FIS' without any exception, reason: 'Try to apply modeling to present an active controller. / P>
Thank you in advance
You presentViewController
Inside code> readyForSegue . For example, if you want to load destinationViewController
with some data, then readyForSegue
should be used.
P>
Comments
Post a Comment