How to create share button in iOS 9?

Try this

-(IBAction)shareAction:(id)sender
 {    
        NSArray* sharedObjects=[NSArray arrayWithObjects:@"sharecontent",  nil];
        UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:sharedObjects applicationActivities:nil];
        activityViewController.popoverPresentationController.sourceView = self.view;
        [self presentViewController:activityViewController animated:YES completion:nil];
 }