I am new to storyboard and xcode (using 4.6) I m using Navigation Storyboard with push segue. I would like to implement a select snap view, that if have minimum 1 snap selected - the segue would work. Otherwise, the user should stay on the same view.
I created 2 UIView: SelectSnapsViewController and ShippingDetailViewController.
In SelectSnapsViewController.m I added the following:
- (IBAction)nextButtonPressed:(id)sender
{
looseDataAlert = NO;
[okkkBtn setFrame:CGRectMake(116, 272, 72, 37)];
if ([appDelegate.selImageDetails count] == 0)
{
label1.text = @"To proceed you need to add snaps.";
[self openAlertView];
}
else{
[self performSegueWithIdentifier:@"MySegue" sender:self];
}
}
When I debug the code - I see that the it always fall in else case of condition, however the segue (transition to the new view) still happens.
How can I prevent the user to be transferred to the new view?