Make a segue directly from one view controller to another, instead of connecting it to a button. Give this meaningful name.
Then in the button action method, do all you need to do first, and then do segue using your control method performSegueWithIdentifier:, using the meaningful name that you selected earlier.
, , . , prepareForSegue: segue.destinationViewController, , .