diff options
author | Paul Gardiner <paul.gardiner@artifex.com> | 2013-11-22 13:12:40 +0000 |
---|---|---|
committer | Paul Gardiner <paul.gardiner@artifex.com> | 2013-11-22 13:12:40 +0000 |
commit | 1a10116e24a1cd09db871c0c92a828e3adc75103 (patch) | |
tree | 925ae598bc73f594efd2aad8d45f757e2b4a835c /platform | |
parent | 6fc675335c3403887d641cc2e7ecb35a8464dd65 (diff) | |
download | mupdf-1a10116e24a1cd09db871c0c92a828e3adc75103.tar.xz |
iOS; remove use of deprecated functions and fix other warnings
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/Classes/MuDocumentController.m | 2 | ||||
-rw-r--r-- | platform/ios/Classes/MuOutlineController.h | 4 | ||||
-rw-r--r-- | platform/ios/Classes/MuOutlineController.m | 1 | ||||
-rw-r--r-- | platform/ios/Classes/MuPageViewNormal.m | 2 |
4 files changed, 6 insertions, 3 deletions
diff --git a/platform/ios/Classes/MuDocumentController.m b/platform/ios/Classes/MuDocumentController.m index 4df7ba40..9e867fb5 100644 --- a/platform/ios/Classes/MuDocumentController.m +++ b/platform/ios/Classes/MuDocumentController.m @@ -129,7 +129,7 @@ static void flattenOutline(NSMutableArray *titles, NSMutableArray *pages, fz_out [indicator setText: @"0000 of 9999"]; [indicator sizeToFit]; [indicator setCenter: CGPointMake(0, INDICATOR_Y)]; - [indicator setTextAlignment: UITextAlignmentCenter]; + [indicator setTextAlignment: NSTextAlignmentCenter]; [indicator setBackgroundColor: [[UIColor blackColor] colorWithAlphaComponent: 0.5]]; [indicator setTextColor: [UIColor whiteColor]]; diff --git a/platform/ios/Classes/MuOutlineController.h b/platform/ios/Classes/MuOutlineController.h index 3af69848..df717e79 100644 --- a/platform/ios/Classes/MuOutlineController.h +++ b/platform/ios/Classes/MuOutlineController.h @@ -7,9 +7,11 @@ #import <UIKit/UIKit.h> +@class MuDocumentController; + @interface MuOutlineController : UITableViewController { - id target; + MuDocumentController *target; NSMutableArray *titles; NSMutableArray *pages; } diff --git a/platform/ios/Classes/MuOutlineController.m b/platform/ios/Classes/MuOutlineController.m index 694fcef3..15e4f49a 100644 --- a/platform/ios/Classes/MuOutlineController.m +++ b/platform/ios/Classes/MuOutlineController.m @@ -5,6 +5,7 @@ // Copyright (c) 2013 Artifex Software, Inc. All rights reserved. // +#import "MuDocumentController.h" #import "MuOutlineController.h" @implementation MuOutlineController diff --git a/platform/ios/Classes/MuPageViewNormal.m b/platform/ios/Classes/MuPageViewNormal.m index b01360fe..c2f609c9 100644 --- a/platform/ios/Classes/MuPageViewNormal.m +++ b/platform/ios/Classes/MuPageViewNormal.m @@ -680,7 +680,7 @@ static void updatePixmap(fz_document *doc, fz_display_list *page_list, fz_displa // dealloc can trigger in background thread when the queued block is // our last owner, and releases us on completion. // Send the dealloc back to the main thread so we don't mess up UIKit. - if (dispatch_get_current_queue() != dispatch_get_main_queue()) { + if (![NSThread isMainThread]) { __block id block_self = self; // don't auto-retain self! dispatch_async(dispatch_get_main_queue(), ^{ [block_self dealloc]; }); } else { |