IOS: Stay on the first view controller before complete all controls (StoryBoard) -


enter image description here

i connected first view controller second 1 using storyboard push segue , interface builder.

the button named go on top/right.

i have 3 textfield must filled before going second controller.

i display alert when 1 of them empty.

the problem code after displaying correct alertview goes secondcontroller instead of remaining on maincontroller.

 if ([segue.identifier isequaltostring:@"datadisplay"]) {     if (![self verifyselection]) {         return;     } else {         rowviewcontroller *rowviewcontroller = segue.destinationviewcontroller; //        rowviewcontroller.delegate = self;     } } 

1) have segue wired directly go button sensor data view controller. don't want this, because anytime touches go, segue going happen ... no stopping it. so, first step remove segue have going go second view controller.

2) instead, wire segue file's owner icon below view controller second view controller. give name datadisplay.

3) in ibaction go button

if ([self verifyselection) {     [self performseguewithidentifier:@"datadisplay" sender:self] } 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -