I have a bar button that I have created an IBAction
for that will save a set of data to a server then return the user to the first of 3 data entry screens. In my current code, I am using a delay function to simulate the saving to server since I do not have the project ready to do that yet but I need to show how it will look when done.
Being very new to development in general, I am sure I am just missing a step here but I am at a loss to see what. This code executes exactly as expected until I introduced the performSegueWithIdentifier
step. That is to say, when the Save button is tapped, the activity indicator begins animating, the code pauses for 4.0 seconds and then the activity indicator stops animating. When I added the performSegueWithIdentifier
step, and the button is tapped, the segue immediately executes.
Your assistance is greatly appreciated.
@IBAction func saveDTrans(sender: UIBarButtonItem) {
// here is where data is saaved to server
appIsWorking ()
delay(4.0){
self.activityIndicator.stopAnimating()
UIApplication.sharedApplication().endIgnoringInteractionEvents()
self.performSegueWithIdentifier("returnToDispenseScreenOne", sender: self) //use this code to perform segue
}
}