Implement prepareForSegue: in your view controller. This gets called before a segue is fired.
In your view controller, it should look like
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"mySegueIdentifier"]) {
[self createGroup:nil];
}
}
If the button is firing a segue in storyboard, this will get called right before it performs the segue.