Skip to content

Commit 1e2ce40

Browse files
committed
Remove unnecessary view
This is to address SpiderOak/SpiderOakMobileClient#529
1 parent db78ed0 commit 1e2ce40

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/ios/FileViewerPluginViewController.m

+9-8
Original file line numberDiff line numberDiff line change
@@ -73,27 +73,28 @@ - (BOOL) openFile:(NSURL *)URL usingViewController:(UIViewController *) viewCont
7373
self.documentInteractionController.UTI = [self UTIForURL:URL];
7474
self.documentInteractionController.delegate = self;
7575

76-
UIView *fileOpenView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 1)];
77-
[[self.myViewController view] addSubview:fileOpenView];
78-
self.view = fileOpenView;
79-
8076
// Configure Document Interaction Controller
8177
[self.documentInteractionController setDelegate:self];
8278

8379
// Open
8480
CGRect screenRect = [[viewController view] bounds];
8581
CGFloat screenWidth = screenRect.size.width;
8682
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];
8886

8987
if(!fileOpenSuccess) {
9088
// There is no app to handle this file
9189
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];
9494

9595
// 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")
9798
message:message
9899
delegate:nil
99100
cancelButtonTitle:NSLocalizedString(@"OK", @"OK")

0 commit comments

Comments
 (0)