Parcourir la source

PDFViewer(iOS) - 文档打开崩溃问题

dinglingui il y a 1 an
Parent
commit
60801c9f45

+ 1 - 1
compdfkit-tools/compdfkit-tools/Common/Controls/BOTA/CPDFBOTAViewController.m

@@ -122,7 +122,7 @@
 
 
 - (void)viewWillLayoutSubviews {
-    _segmentedControl.frame = CGRectMake(self.view.frame.size.width / 4, 44 , self.view.frame.size.width / 2, 30);
+    _segmentedControl.frame = CGRectMake(15, 44 , self.view.frame.size.width - 30, 30);
     self.doneBtn.frame = CGRectMake(self.view.frame.size.width - 60, 5, 50, 50);
     if (@available(iOS 11.0, *)) {
         self.outlineViewController.view.frame = CGRectMake(0, self.view.safeAreaInsets.top + 80, self.view.bounds.size.width - self.view.safeAreaInsets.left - self.view.safeAreaInsets.right, self.view.bounds.size.height - self.view.safeAreaInsets.top - self.view.safeAreaInsets.bottom - 80);

+ 1 - 1
viewer-ctrl-demo/viewer-ctrl-demo/AppDelegate.m

@@ -63,7 +63,7 @@ static AppDelegate *appDelegate = NULL;
     self.window = window;
     self.window.backgroundColor = [UIColor whiteColor];
     
-    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"04_SetPassword" ofType:@"pdf"];
+    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"PDF32000_2008" ofType:@"pdf"];
         
     CPDFViewController *pdfViewController = [[CPDFViewController alloc] initWithFilePath:filePath];
     CNavigationController *navController = [[CNavigationController alloc]initWithRootViewController:pdfViewController];