-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotes.m
More file actions
94 lines (56 loc) · 2.75 KB
/
Notes.m
File metadata and controls
94 lines (56 loc) · 2.75 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//
// Notes.m
// Howdy
//
// Created by Edan Lichtenstein on 3/31/14.
// Copyright (c) 2014 Edan Lichtenstein. All rights reserved.
//
#import "Notes.h"
@implementation Notes
//UIDocumentInteractionController
/*
NSURL *shareUrl = self.recorder.url;
// NSURL *shareUrl = [NSURL fileURLWithPath:[NSString stringWithFormat: @"%@",[[NSBundle mainBundle] self.recorder.url]]];
if (shareUrl) {
self.docController = [self setupControllerWithURL:shareUrl usingDelegate:self];
//self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:shareUrl];
NSLog(@"%@", shareUrl);
// Configure Document Interaction Controller
//[self.documentInteractionController setDelegate:self];
//_documentInteractionController.delegate = self;
// [self.documentInteractionController presentOptionsMenuFromRect:self.view.bounds inView:self.view animated:YES];
[self.docController presentOpenInMenuFromRect:self.view.bounds inView:self.view animated:YES];
// [self.documentInteractionController presentOpenInMenuFromRect:self.view.bounds inView:self.view animated:YES];
}
- (UIViewController *) documentInteractionControllerViewControllerForPreview: (UIDocumentInteractionController *) controller {
return self;
}
- (UIDocumentInteractionController *) setupControllerWithURL:(NSURL *)fileURL usingDelegate:(id <UIDocumentInteractionControllerDelegate>) interactionDelegate {
UIDocumentInteractionController *interactionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
interactionController.delegate = interactionDelegate;
return interactionController;
}
- (UIView *)documentInteractionControllerViewForPreview:(UIDocumentInteractionController *)controller
{
return self.view;
}
- (CGRect)documentInteractionControllerRectForPreview:(UIDocumentInteractionController *)controller
{
return self.view.frame;
}
*/
/*
UI Activity Controller stuff:
@property UIActivityViewController *activityViewController;
NSString *shareString = @"Howdy Partner!!";
NSURL *shareUrl = self.recorder.url;
NSData *audioData = [NSData dataWithContentsOfURL:shareUrl];
NSArray *activityItems = [NSArray arrayWithObjects:shareUrl, shareString, nil];
if (shareUrl) {
self.activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
self.activityViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
self.activityViewController.excludedActivityTypes = @[UIActivityTypeAirDrop, UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll];
[self presentViewController:self.activityViewController animated:YES completion:nil];
}
*/
@end