@@ -73,27 +73,28 @@ - (BOOL) openFile:(NSURL *)URL usingViewController:(UIViewController *) viewCont
73
73
self.documentInteractionController .UTI = [self UTIForURL: URL];
74
74
self.documentInteractionController .delegate = self;
75
75
76
- UIView *fileOpenView = [[UIView alloc ] initWithFrame: CGRectMake (0 , 0 , 1 , 1 )];
77
- [[self .myViewController view ] addSubview: fileOpenView];
78
- self.view = fileOpenView;
79
-
80
76
// Configure Document Interaction Controller
81
77
[self .documentInteractionController setDelegate: self ];
82
78
83
79
// Open
84
80
CGRect screenRect = [[viewController view ] bounds ];
85
81
CGFloat screenWidth = screenRect.size .width ;
86
82
CGFloat screenHeight = screenRect.size .height ;
87
- fileOpenSuccess = [self .documentInteractionController presentOptionsMenuFromRect: CGRectMake ((screenWidth / 2 ), screenHeight, 1 , 1 ) inView: fileOpenView animated: YES ];
83
+ fileOpenSuccess = [self .documentInteractionController
84
+ presentOptionsMenuFromRect: CGRectMake ((screenWidth / 2 ), screenHeight, 1 , 1 )
85
+ inView: [self .myViewController view ] animated: YES ];
88
86
89
87
if (!fileOpenSuccess) {
90
88
// There is no app to handle this file
91
89
NSString *deviceType = [UIDevice currentDevice ].localizedModel ;
92
- NSString *message = [NSString stringWithFormat: NSLocalizedString(@" Your %@ doesn't seem to have any other Apps installed that can open this document." ,
93
- @" Your %@ doesn't seem to have any other Apps installed that can open this document." ), deviceType];
90
+ NSString *message = [NSString stringWithFormat: NSLocalizedString(
91
+ @" Your %@ doesn't seem to have any other Apps installed that can open this document." ,
92
+ @" Your %@ doesn't seem to have any other Apps installed that can open this document." ),
93
+ deviceType];
94
94
95
95
// Display alert
96
- UIAlertView *alert = [[UIAlertView alloc ] initWithTitle: NSLocalizedString(@" No suitable Apps installed" , @" No suitable App installed" )
96
+ UIAlertView *alert = [[UIAlertView alloc ] initWithTitle: NSLocalizedString(
97
+ @" No suitable Apps installed" , @" No suitable App installed" )
97
98
message: message
98
99
delegate: nil
99
100
cancelButtonTitle: NSLocalizedString(@" OK" , @" OK" )
0 commit comments