author | Markus Bröker<broeker.markus@googlemail.com> |
Tue, 28 Mar 2017 23:26:03 +0200 | |
changeset 2 | fd23014eaa85 |
parent 1 | 58bbaa38119e |
child 3 | 523bf90e16b7 |
permissions | -rw-r--r-- |
0
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
1 |
// |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
2 |
// ViewController.m |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
3 |
// PDFViewer |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
4 |
// |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
5 |
// Created by Markus Bröker on 27.03.17. |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
6 |
// Copyright © 2017 Markus Bröker. All rights reserved. |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
7 |
// |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
8 |
|
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
9 |
#import "ViewController.h" |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
10 |
|
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
11 |
@implementation ViewController |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
12 |
|
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
13 |
@synthesize pdfViewer = _pdfViewer; |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
14 |
|
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
15 |
- (void)viewDidLoad { |
1
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
16 |
[super viewDidLoad]; |
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
17 |
|
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
18 |
NSString *str = @"https://derinistihbarat.files.wordpress.com/2012/08/die-doktorarbeit-von-stasi-koko-chef-alexander-schalck-golodtkowski.pdf"; |
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
19 |
|
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
20 |
NSURL *url = [NSURL URLWithString:str]; |
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
21 |
|
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
22 |
PDFDocument *doc = [[PDFDocument alloc] initWithURL:url]; |
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
23 |
[_pdfViewer setDocument:doc]; |
0
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
24 |
} |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
25 |
|
1
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
26 |
- (void)viewDidAppear { |
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
27 |
[_pdfViewer speak:[_pdfViewer getTexts]]; |
0
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
28 |
} |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
29 |
|
1
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
30 |
- (void)viewDidDisappear { |
2
fd23014eaa85
Abgleichen des Menüpunkts "Speech" mit der Anwendungslogik
Markus Bröker<broeker.markus@googlemail.com>
parents:
1
diff
changeset
|
31 |
[_pdfViewer stopSpeaking:self]; |
0
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
32 |
} |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
33 |
|
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
34 |
- (void)setRepresentedObject:(id)representedObject { |
1
58bbaa38119e
Coding Style vereinheitlicht
Markus Bröker<broeker.markus@googlemail.com>
parents:
0
diff
changeset
|
35 |
[super setRepresentedObject:representedObject]; |
0
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
36 |
} |
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
37 |
|
c344b61ddaf6
Initialer Commit des sprechenden PDFViewers
Markus Bröker<broeker.markus@googlemail.com>
parents:
diff
changeset
|
38 |
@end |