-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPeerHealthViewController.m
41 lines (34 loc) · 1.18 KB
/
PeerHealthViewController.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
//
// PeerHealthViewController.m
// HCI Project
//
// Created by Michelle Albright on 4/3/18.
// Copyright © 2018 Michelle Albright. All rights reserved.
//
#import "PeerHealthViewController.h"
@interface PeerHealthViewController ()
@end
@implementation PeerHealthViewController
- (void)viewDidLoad {
[super viewDidLoad];
_contactBtn.layer.cornerRadius = 10;
_contactBtn.clipsToBounds = true;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)contactBtn:(id)sender {
if ([MFMailComposeViewController canSendMail]) {
MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init];
mailComposer.mailComposeDelegate = self;
[mailComposer setToRecipients:@[@"[email protected]"]];
[self presentViewController:mailComposer animated:YES completion:nil];
} else {
printf("No mail account configured\n");
}
}
- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
[self dismissViewControllerAnimated:YES completion:nil];
}
@end