ios - How to stop push button -


This question is already an answer here

  • 5 answers

I I'm a newbie for iOS program and I need your help.

When I click on the button, my code checks to have a condition, if the condition is correct, I want to use the next to go to UIViewController readyForSegue with data, but if the condition is , I do not want that VC next to to use and want to stay on current VC .

How can I do this?

When I click on my button, it is possible to block access to the code directly in the next VC IBAction ?

I try to code on a push button

  - (IBAction) Lancerity: (ID) sender {...    

Other answers should work, but they ignore the whole issue of segues in a way: if you should There is no need to manually action on buttons for things, instead you should override - (bool) shouldPerformSegueWithIdentifier:. (NSString *) Identifier this: (ID) This selector

To do this, you need to give your segue one (NSString *) identifier this: (id) this {if ([ Identifier isEqualToString: @ "- (bool) shouldPerformSegueWithIdentifier

 : If the interface is the identifier from the builder, add this code to your parents ViewController MyIdentifier"]] {return some condition; } And return yes; }  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -