-
Notifications
You must be signed in to change notification settings - Fork 0
/
MoreMenuViewController.m
42 lines (27 loc) · 1.29 KB
/
MoreMenuViewController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// MoreMenuViewController.m
// Story
//
// Created by George Ashton on 20/02/2015.
// Copyright (c) 2015 George Ashton. All rights reserved.
//
#import "MoreMenuViewController.h"
#import "GameKitHelper.h"
#import <GameKit/GameKit.h>
@implementation MoreMenuViewController
- (IBAction)backButton:(UIButton *)sender {
}
- (IBAction)tellFriend:(id)sender {
NSString *shareText = [NSString stringWithFormat:@"Check out Stories With Friends, a new word game for iPhone!"]; // Share message
NSArray *itemsToShare = @[shareText];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil];
activityVC.excludedActivityTypes = @[];
[self presentViewController:activityVC animated:YES completion:nil];
}
- (IBAction)sendFriendRequest:(id)sender {
GKFriendRequestComposeViewController *friendRequestViewController = [[GKFriendRequestComposeViewController alloc] init];
friendRequestViewController.composeViewDelegate = self;
[friendRequestViewController addRecipientPlayers: nil];
[self presentViewController:friendRequestViewController animated:YES completion:nil];
}
@end