質問編集履歴
1
コード修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,27 +10,43 @@
|
|
10
10
|
|
11
11
|
###該当のソースコード
|
12
12
|
|
13
|
-
|
13
|
+
```
|
14
|
-
|
15
|
-
NSURL *url = [NSURL fileURLWithPath:filePath];
|
16
|
-
|
17
|
-
UIDocumentInteractionController docInteractionController= [UIDocumentInteractionController interactionControllerWithURL:url];
|
18
|
-
|
19
|
-
docInteractionController.delegate = self;
|
20
14
|
|
21
15
|
|
22
16
|
|
23
|
-
|
17
|
+
@implementation ViewController
|
24
18
|
|
19
|
+
- (IBAction)tappedButton:(UIButton *)button
|
25
20
|
|
21
|
+
{
|
26
22
|
|
27
|
-
if
|
23
|
+
NSString *filePath = ファイルパス...;
|
28
24
|
|
25
|
+
NSURL *url = [NSURL fileURLWithPath:filePath];
|
26
|
+
|
27
|
+
UIDocumentInteractionController *docInteractionController
|
28
|
+
|
29
|
+
= [UIDocumentInteractionController interactionControllerWithURL:url];
|
30
|
+
|
31
|
+
docInteractionController.delegate = self;
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
BOOL result = [docInteractionController presentOptionsMenuFromRect:button.frame inView:self.view animated:YES];
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
if (!result){
|
40
|
+
|
29
|
-
// アラート表示...
|
41
|
+
// アラート表示...
|
42
|
+
|
43
|
+
}
|
30
44
|
|
31
45
|
}
|
32
46
|
|
33
47
|
|
48
|
+
|
49
|
+
```
|
34
50
|
|
35
51
|
###補足情報(言語/FW/ツール等のバージョンなど)
|
36
52
|
|