Browse Source

CPDFView(ios) - 页眉页脚的自适应

yangliuhua 2 years ago
parent
commit
33afbd7586

+ 78 - 4
PDFViewer.xcodeproj/project.pbxproj

@@ -21,7 +21,16 @@
 		C993B912292B07F600D8F474 /* CPDFHeaderFooterSettingController.m in Sources */ = {isa = PBXBuildFile; fileRef = C993B911292B07F600D8F474 /* CPDFHeaderFooterSettingController.m */; };
 		C993B915292B1C4100D8F474 /* CPDFDropDownView.m in Sources */ = {isa = PBXBuildFile; fileRef = C993B914292B1C4100D8F474 /* CPDFDropDownView.m */; };
 		C993B918292B5BC500D8F474 /* CPDFModelData.m in Sources */ = {isa = PBXBuildFile; fileRef = C993B917292B5BC500D8F474 /* CPDFModelData.m */; };
-		C993B91A292CAE2100D8F474 /* Masonry in Resources */ = {isa = PBXBuildFile; fileRef = C993B919292CAE2100D8F474 /* Masonry */; };
+		C9E65160292CBC31001B2C9D /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E65146292CBC2F001B2C9D /* MASViewConstraint.m */; };
+		C9E65161292CBC31001B2C9D /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E65148292CBC2F001B2C9D /* NSLayoutConstraint+MASDebugAdditions.m */; };
+		C9E65162292CBC31001B2C9D /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E65149292CBC30001B2C9D /* View+MASAdditions.m */; };
+		C9E65163292CBC31001B2C9D /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E6514E292CBC30001B2C9D /* MASViewAttribute.m */; };
+		C9E65165292CBC31001B2C9D /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E65150292CBC30001B2C9D /* MASConstraintMaker.m */; };
+		C9E65166292CBC31001B2C9D /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E65153292CBC30001B2C9D /* ViewController+MASAdditions.m */; };
+		C9E65167292CBC31001B2C9D /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E65155292CBC30001B2C9D /* MASConstraint.m */; };
+		C9E65168292CBC31001B2C9D /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E65159292CBC31001B2C9D /* MASLayoutConstraint.m */; };
+		C9E65169292CBC31001B2C9D /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E6515B292CBC31001B2C9D /* MASCompositeConstraint.m */; };
+		C9E6516A292CBC31001B2C9D /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E6515C292CBC31001B2C9D /* NSArray+MASAdditions.m */; };
 		EC3198782922593A008E0889 /* ComPDFKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC31987629225931008E0889 /* ComPDFKit.framework */; };
 		EC3198792922593A008E0889 /* ComPDFKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EC31987629225931008E0889 /* ComPDFKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		EC62978E29220F8300D339EE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EC62978D29220F8300D339EE /* AppDelegate.m */; };
@@ -75,7 +84,31 @@
 		C993B914292B1C4100D8F474 /* CPDFDropDownView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFDropDownView.m; sourceTree = "<group>"; };
 		C993B916292B5BC500D8F474 /* CPDFModelData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFModelData.h; sourceTree = "<group>"; };
 		C993B917292B5BC500D8F474 /* CPDFModelData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFModelData.m; sourceTree = "<group>"; };
-		C993B919292CAE2100D8F474 /* Masonry */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Masonry; sourceTree = "<group>"; };
+		C9E65146292CBC2F001B2C9D /* MASViewConstraint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASViewConstraint.m; sourceTree = "<group>"; };
+		C9E65147292CBC2F001B2C9D /* NSArray+MASAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+MASAdditions.h"; sourceTree = "<group>"; };
+		C9E65148292CBC2F001B2C9D /* NSLayoutConstraint+MASDebugAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSLayoutConstraint+MASDebugAdditions.m"; sourceTree = "<group>"; };
+		C9E65149292CBC30001B2C9D /* View+MASAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "View+MASAdditions.m"; sourceTree = "<group>"; };
+		C9E6514A292CBC30001B2C9D /* Masonry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Masonry.h; sourceTree = "<group>"; };
+		C9E6514B292CBC30001B2C9D /* MASViewConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASViewConstraint.h; sourceTree = "<group>"; };
+		C9E6514C292CBC30001B2C9D /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ViewController+MASAdditions.h"; sourceTree = "<group>"; };
+		C9E6514D292CBC30001B2C9D /* MASConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASConstraint.h; sourceTree = "<group>"; };
+		C9E6514E292CBC30001B2C9D /* MASViewAttribute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASViewAttribute.m; sourceTree = "<group>"; };
+		C9E65150292CBC30001B2C9D /* MASConstraintMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASConstraintMaker.m; sourceTree = "<group>"; };
+		C9E65151292CBC30001B2C9D /* MASConstraintMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASConstraintMaker.h; sourceTree = "<group>"; };
+		C9E65152292CBC30001B2C9D /* MASLayoutConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASLayoutConstraint.h; sourceTree = "<group>"; };
+		C9E65153292CBC30001B2C9D /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ViewController+MASAdditions.m"; sourceTree = "<group>"; };
+		C9E65154292CBC30001B2C9D /* NSArray+MASShorthandAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+MASShorthandAdditions.h"; sourceTree = "<group>"; };
+		C9E65155292CBC30001B2C9D /* MASConstraint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASConstraint.m; sourceTree = "<group>"; };
+		C9E65156292CBC31001B2C9D /* MASUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASUtilities.h; sourceTree = "<group>"; };
+		C9E65157292CBC31001B2C9D /* View+MASAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "View+MASAdditions.h"; sourceTree = "<group>"; };
+		C9E65158292CBC31001B2C9D /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "View+MASShorthandAdditions.h"; sourceTree = "<group>"; };
+		C9E65159292CBC31001B2C9D /* MASLayoutConstraint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASLayoutConstraint.m; sourceTree = "<group>"; };
+		C9E6515A292CBC31001B2C9D /* NSLayoutConstraint+MASDebugAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSLayoutConstraint+MASDebugAdditions.h"; sourceTree = "<group>"; };
+		C9E6515B292CBC31001B2C9D /* MASCompositeConstraint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASCompositeConstraint.m; sourceTree = "<group>"; };
+		C9E6515C292CBC31001B2C9D /* NSArray+MASAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+MASAdditions.m"; sourceTree = "<group>"; };
+		C9E6515D292CBC31001B2C9D /* MASCompositeConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASCompositeConstraint.h; sourceTree = "<group>"; };
+		C9E6515E292CBC31001B2C9D /* MASViewAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASViewAttribute.h; sourceTree = "<group>"; };
+		C9E6515F292CBC31001B2C9D /* MASConstraint+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MASConstraint+Private.h"; sourceTree = "<group>"; };
 		EC31987629225931008E0889 /* ComPDFKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ComPDFKit.framework; sourceTree = "<group>"; };
 		EC62978929220F8300D339EE /* PDFViewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PDFViewer.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		EC62978C29220F8300D339EE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@@ -128,6 +161,38 @@
 			path = PDFViewer/View/Image;
 			sourceTree = "<group>";
 		};
+		C9E65145292CBBDE001B2C9D /* Masonry */ = {
+			isa = PBXGroup;
+			children = (
+				C9E6515D292CBC31001B2C9D /* MASCompositeConstraint.h */,
+				C9E6515B292CBC31001B2C9D /* MASCompositeConstraint.m */,
+				C9E6514D292CBC30001B2C9D /* MASConstraint.h */,
+				C9E65155292CBC30001B2C9D /* MASConstraint.m */,
+				C9E6515F292CBC31001B2C9D /* MASConstraint+Private.h */,
+				C9E65151292CBC30001B2C9D /* MASConstraintMaker.h */,
+				C9E65150292CBC30001B2C9D /* MASConstraintMaker.m */,
+				C9E65152292CBC30001B2C9D /* MASLayoutConstraint.h */,
+				C9E65159292CBC31001B2C9D /* MASLayoutConstraint.m */,
+				C9E6514A292CBC30001B2C9D /* Masonry.h */,
+				C9E65156292CBC31001B2C9D /* MASUtilities.h */,
+				C9E6515E292CBC31001B2C9D /* MASViewAttribute.h */,
+				C9E6514E292CBC30001B2C9D /* MASViewAttribute.m */,
+				C9E6514B292CBC30001B2C9D /* MASViewConstraint.h */,
+				C9E65146292CBC2F001B2C9D /* MASViewConstraint.m */,
+				C9E65147292CBC2F001B2C9D /* NSArray+MASAdditions.h */,
+				C9E6515C292CBC31001B2C9D /* NSArray+MASAdditions.m */,
+				C9E65154292CBC30001B2C9D /* NSArray+MASShorthandAdditions.h */,
+				C9E6515A292CBC31001B2C9D /* NSLayoutConstraint+MASDebugAdditions.h */,
+				C9E65148292CBC2F001B2C9D /* NSLayoutConstraint+MASDebugAdditions.m */,
+				C9E65157292CBC31001B2C9D /* View+MASAdditions.h */,
+				C9E65149292CBC30001B2C9D /* View+MASAdditions.m */,
+				C9E65158292CBC31001B2C9D /* View+MASShorthandAdditions.h */,
+				C9E6514C292CBC30001B2C9D /* ViewController+MASAdditions.h */,
+				C9E65153292CBC30001B2C9D /* ViewController+MASAdditions.m */,
+			);
+			path = Masonry;
+			sourceTree = "<group>";
+		};
 		EC62978029220F8300D339EE = {
 			isa = PBXGroup;
 			children = (
@@ -148,7 +213,7 @@
 		EC62978B29220F8300D339EE /* PDFViewer */ = {
 			isa = PBXGroup;
 			children = (
-				C993B919292CAE2100D8F474 /* Masonry */,
+				C9E65145292CBBDE001B2C9D /* Masonry */,
 				EC6297B52922393F00D339EE /* Controller */,
 				EC6297AD29222D3100D339EE /* Model */,
 				EC6297AE29222D4400D339EE /* View */,
@@ -273,7 +338,6 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				C993B91A292CAE2100D8F474 /* Masonry in Resources */,
 				EC62979C29220F8400D339EE /* LaunchScreen.storyboard in Resources */,
 				C96D13932924793800CC92C7 /* btn_more.png in Resources */,
 				C993B9042926541D00D8F474 /* add_newpage01.png in Resources */,
@@ -295,16 +359,26 @@
 				C993B915292B1C4100D8F474 /* CPDFDropDownView.m in Sources */,
 				ECC8831D2923352B00F6392E /* CPDFViewController.m in Sources */,
 				C993B918292B5BC500D8F474 /* CPDFModelData.m in Sources */,
+				C9E65169292CBC31001B2C9D /* MASCompositeConstraint.m in Sources */,
 				C96D13962924DD7E00CC92C7 /* CPDFHeaderFooterAddController.m in Sources */,
 				C993B909292654BE00D8F474 /* CPDFBatesDeleteViewController.m in Sources */,
 				EC62979429220F8300D339EE /* ViewController.m in Sources */,
 				EC6297B8292239A700D339EE /* CPDFModel.m in Sources */,
+				C9E65167292CBC31001B2C9D /* MASConstraint.m in Sources */,
+				C9E65163292CBC31001B2C9D /* MASViewAttribute.m in Sources */,
+				C9E65165292CBC31001B2C9D /* MASConstraintMaker.m in Sources */,
+				C9E65162292CBC31001B2C9D /* View+MASAdditions.m in Sources */,
+				C9E65161292CBC31001B2C9D /* NSLayoutConstraint+MASDebugAdditions.m in Sources */,
 				C993B90C29271FCA00D8F474 /* CPDFBatesAddViewController.m in Sources */,
+				C9E65166292CBC31001B2C9D /* ViewController+MASAdditions.m in Sources */,
+				C9E65160292CBC31001B2C9D /* MASViewConstraint.m in Sources */,
 				C993B90229264DC900D8F474 /* CPDFBatesSettingController.m in Sources */,
+				C9E65168292CBC31001B2C9D /* MASLayoutConstraint.m in Sources */,
 				C993B90F2927200400D8F474 /* CPDFBatesAddView.m in Sources */,
 				C993B912292B07F600D8F474 /* CPDFHeaderFooterSettingController.m in Sources */,
 				EC62978E29220F8300D339EE /* AppDelegate.m in Sources */,
 				EC62979F29220F8400D339EE /* main.m in Sources */,
+				C9E6516A292CBC31001B2C9D /* NSArray+MASAdditions.m in Sources */,
 				C993B8FE2925E52800D8F474 /* CPDFHeaderFooterDeleteController.m in Sources */,
 				EC6297BD292239C200D339EE /* CPDFListController.m in Sources */,
 				EC62979129220F8300D339EE /* SceneDelegate.m in Sources */,

BIN
PDFViewer.xcodeproj/project.xcworkspace/xcuserdata/kdanmobile_2.xcuserdatad/UserInterfaceState.xcuserstate


+ 57 - 9
PDFViewer.xcodeproj/xcuserdata/kdanmobile_2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -71,31 +71,79 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "A50A5C35-B3BE-43DE-A535-6906058FECEB"
+            uuid = "7D49F75E-93DC-4295-8BA2-457888F78E13"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "PDFViewer/Controller/CPDFHeaderFooterAddController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "65"
-            endingLineNumber = "65"
-            landmarkName = "-doneClick:"
+            startingLineNumber = "224"
+            endingLineNumber = "224"
+            landmarkName = "-viewWillTransitionToSize:withTransitionCoordinator:"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "7D49F75E-93DC-4295-8BA2-457888F78E13 - ed2ffc1774d67d30"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[CPDFHeaderFooterAddController viewWillTransitionToSize:withTransitionCoordinator:]"
+                  moduleName = "PDFViewer"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile_2/kmpdfkit_demo/PDFViewer/Controller/CPDFHeaderFooterAddController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "224"
+                  endingLineNumber = "224"
+                  offsetFromSymbolStart = "155">
+               </Location>
+               <Location
+                  uuid = "7D49F75E-93DC-4295-8BA2-457888F78E13 - e02196fc83340ad5"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__84-[CPDFHeaderFooterAddController viewWillTransitionToSize:withTransitionCoordinator:]_block_invoke"
+                  moduleName = "PDFViewer"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile_2/kmpdfkit_demo/PDFViewer/Controller/CPDFHeaderFooterAddController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "225"
+                  endingLineNumber = "225"
+                  offsetFromSymbolStart = "57">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "8893661F-BBCA-427A-9B71-FA0204E29B92"
-            shouldBeEnabled = "Yes"
+            uuid = "D74DADAB-BC29-4CBC-99D2-A7D19E66ADA1"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "PDFViewer/Controller/CPDFHeaderFooterSettingController.m"
+            filePath = "PDFViewer/Controller/CPDFHeaderFooterAddController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "80"
+            endingLineNumber = "80"
+            landmarkName = "-changeFontSize:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "E8A7BF47-D4E9-4A9B-82AD-9B3309FC9083"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDFViewer/Controller/CPDFViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "59"
-            endingLineNumber = "59"
+            startingLineNumber = "98"
+            endingLineNumber = "98"
             landmarkName = "-getModel:"
             landmarkType = "7">
          </BreakpointContent>

+ 3 - 0
PDFViewer/Controller/CPDFHeaderFooterAddController.h

@@ -10,6 +10,7 @@
 #import <ComPDFKit/ComPDFKit.h>
 #import "CPDFHeaderFooterAddView.h"
 #import "CPDFModelData.h"
+#import "Masonry.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -37,6 +38,7 @@ typedef struct Position {
 - (void)changeLocation:(UISegmentedControl *)sender;
 - (void)changeAligbment:(UISegmentedControl *)sender;
 - (void)sliderChange:(UISlider *)slider;
+- (void)changeFontSize:(UITextField *)text;
  
 @property (nonatomic,assign) CGSize size;
 @property (nonatomic,strong) UIImage *image;
@@ -47,6 +49,7 @@ typedef struct Position {
 @property (nonatomic,strong) CPDFDocument *document;
 @property (nonatomic,strong) CPDFHeaderFooter *headerFooter;
 @property (nonatomic,strong) CPDFView *pdfView;
+@property (nonatomic,strong) UIImageView *imageView;
 
 @end
 

+ 115 - 48
PDFViewer/Controller/CPDFHeaderFooterAddController.m

@@ -35,19 +35,34 @@
     //initialize model
     _modelData = [[CPDFModelData alloc] init];
     //add page image
-    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake((393/2)-(self.size.width/6), 125, self.size.width/3, self.size.height/3)];
-    imageView.image = self.image;
-    CALayer *layer = [imageView layer];
+    //_imageView = [[UIImageView alloc] initWithFrame:CGRectMake((393/2)-(self.size.width/6), 125, self.size.width/3, self.size.height/3)];
+    _imageView = [[UIImageView alloc] init];
+    _imageView.image = self.image;
+    CALayer *layer = [_imageView layer];
     layer.borderColor = [[UIColor blackColor] CGColor];
     layer.borderWidth = 1.0f;
-    [self.view addSubview:imageView];
-    //add view
-    _headerFooterview = [[CPDFHeaderFooterAddView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height/2, self.view.frame.size.width, self.view.frame.size.height)];
+    [self.view addSubview:_imageView];
+    _headerFooterview = [[CPDFHeaderFooterAddView alloc] init];
     [self.view addSubview:_headerFooterview];
+    [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.view.mas_top).offset(125);
+        make.left.equalTo(self.view.mas_left).offset((393/2)-(self.size.width/6));
+        make.width.mas_equalTo(self.size.width/3);
+        make.height.mas_equalTo(self.size.height/3);
+    }];
+    
+    //add view
+    [self.headerFooterview mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.imageView.mas_bottom).offset(60);
+        make.left.equalTo(self.view.mas_left);
+        make.width.mas_equalTo(self.view.frame.size.width);
+        make.height.mas_equalTo(self.view.frame.size.height);
+    }];
+    
     [_headerFooterview.localSegment addTarget:self action:@selector(changeLocation:) forControlEvents:UIControlEventValueChanged];
     [_headerFooterview.aligbmentSegment addTarget:self action:@selector(changeAligbment:) forControlEvents:UIControlEventValueChanged];
     [_headerFooterview.colorSlider addTarget:self action:@selector(sliderChange:) forControlEvents:UIControlEventValueChanged];
-    
+    [_headerFooterview.fontSizeText addTarget:self action:@selector(changeFontSize:) forControlEvents:UIControlEventEditingDidEnd];
 }
 
 - (void)cancelClick:(UIBarButtonItem *)btn {
@@ -55,17 +70,16 @@
 }
 
 - (void)doneClick:(UIBarButtonItem *)btn {
-    /*self.headerFooter = [self.document headerFooter];
-    [self.headerFooter clear];
-    self.headerFooter.pageString = @"2";
-    [self.headerFooter setText:@"1" atIndex:1];
-    [self.headerFooter setTextColor:self.modelData.fontColor atIndex:self.modelData.fontPosition];
-    [self.headerFooter update];*/
     NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:self.modelData,@"model", nil];
     NSNotification *notification = [NSNotification notificationWithName:@"changeModel" object:nil userInfo:dict];
     [[NSNotificationCenter defaultCenter] postNotification:notification];
     [self.navigationController popViewControllerAnimated:YES];
-    //[self.navigationController popViewControllerAnimated:YES];
+}
+
+- (void)changeFontSize:(UITextField *)text {
+    float size = [text.text floatValue];
+    _showLabel.font = [UIFont systemFontOfSize:size / 3];
+    _modelData.fontSize = size;
 }
 
 //slider select color
@@ -107,6 +121,10 @@
             self.showLabel.textColor = [UIColor blackColor];
             self.modelData.fontColor = [UIColor blackColor];
             break;
+        case 9:
+            self.showLabel.textColor = [UIColor whiteColor];
+            self.modelData.fontColor = [UIColor whiteColor];
+            break;
         default:
             break;
     }
@@ -139,50 +157,99 @@
     if (_showLabel == nil) {
         _showLabel = [[UILabel alloc] init];
     }
+    [_showLabel setText:@"1"];
+    [self.imageView addSubview:self.showLabel];
     switch (self.position.location) {
         case kHeader:
-            NSLog(@"header");
-            switch (self.position.aligment) {
-                case kLeft:
-                    _showLabel.frame = CGRectMake((393/2)-(self.size.width/6)+2, 177, 5, 5);
-                    self.modelData.fontPosition = 0;
-                    break;
-                case kCenter:
-                    _showLabel.frame = CGRectMake(393/2, 177, 5, 5);
-                    self.modelData.fontPosition = 1;
-                    break;
-                case kRinght:
-                    _showLabel.frame = CGRectMake((393/2)+(self.size.width/6)-7, 177, 5, 5);
-                    self.modelData.fontPosition = 2;
-                    break;
-                default:
-                    break;
+            if (self.position.aligment == kLeft) {
+                [_showLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.equalTo(_imageView.mas_top).offset(0.5);
+                    make.left.equalTo(self.imageView.mas_left).offset(0.5);
+                    make.height.mas_equalTo(10);
+                    make.width.mas_equalTo(10);
+                }];
+                self.modelData.fontPosition = 0;
+            } else if (self.position.aligment == kCenter) {
+                [_showLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.equalTo(_imageView.mas_top).offset(0.5);
+                    make.left.equalTo(self.imageView.mas_left).offset(self.size.width / 6);
+                    make.height.mas_equalTo(10);
+                    make.width.mas_equalTo(10);
+                }];
+                self.modelData.fontPosition = 1;
+            } else {
+                [_showLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.equalTo(self.imageView.mas_top).offset(0.5);
+                    make.left.equalTo(self.imageView.mas_left).offset(self.size.width / 3 - 12);
+                    make.height.mas_equalTo(10);
+                    make.width.mas_equalTo(10);
+                }];
+                self.modelData.fontPosition = 2;
             }
             break;
         case kFooter:
-            NSLog(@"Footer");
-            switch (self.position.aligment) {
-                case kLeft:
-                    _showLabel.frame = CGRectMake((393/2)-(self.size.width/6)+2, 170+self.size.height/3, 5, 5);
-                    self.modelData.fontPosition = 3;
-                    break;
-                case kCenter:
-                    _showLabel.frame = CGRectMake(393/2, 170+self.size.height/3, 5, 5);
-                    self.modelData.fontPosition = 4;
-                    break;
-                case kRinght:
-                    _showLabel.frame = CGRectMake((393/2)+(self.size.width/6)-7, 170+self.size.height/3, 5, 5);
-                    self.modelData.fontPosition = 5;
-                    break;
-                default:
-                    break;
+            if (self.position.aligment == kLeft) {
+                [_showLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.equalTo(self.imageView.mas_top).offset(self.size.height / 3 - 12);
+                    make.left.equalTo(self.imageView.mas_left).offset(0.5);
+                    make.height.mas_equalTo(10);
+                    make.width.mas_equalTo(10);
+                }];
+                self.modelData.fontPosition = 3;
+            } else if (self.position.aligment == kCenter) {
+                [_showLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.equalTo(self.imageView.mas_top).offset(self.size.height / 3 - 12);
+                    make.left.equalTo(self.imageView.mas_left).offset(self.size.width/6);
+                    make.height.mas_equalTo(10);
+                    make.width.mas_equalTo(10);
+                }];
+                self.modelData.fontPosition = 4;
+            } else {
+                [_showLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.equalTo(self.imageView.mas_top).offset(self.size.height / 3 - 12);
+                    make.left.equalTo(self.imageView.mas_left).offset(self.size.width / 3 - 12);
+                    make.height.mas_equalTo(10);
+                    make.width.mas_equalTo(10);
+                }];
+                self.modelData.fontPosition = 5;
             }
             break;
         default:
             break;
     }
-    [_showLabel setText:@"1"];
-    [self.view addSubview:_showLabel];
+}
+
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    if ([UIDevice currentDevice].orientation == UIDeviceOrientationLandscapeRight) {
+        [_imageView mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(self.view.mas_top).offset((393/2)-(self.size.height/6));
+            make.left.equalTo(self.view.mas_left).offset((393/2)-(self.size.width/6));
+            make.width.mas_equalTo(self.size.width/3);
+            make.height.mas_equalTo(self.size.height/3);
+        }];
+        //add view
+        [self.headerFooterview mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(self.view.mas_top).offset(15);
+            make.left.equalTo(self.view.mas_left).offset(self.view.frame.size.width / 2 + 200);
+            make.width.mas_equalTo(393);
+            make.height.mas_equalTo(self.view.frame.size.height - 20);
+        }];
+        
+    } else if ([UIDevice currentDevice].orientation == UIDeviceOrientationPortrait) {
+        [_imageView mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(self.view.mas_top).offset(125);
+            make.left.equalTo(self.view.mas_left).offset((393 / 2)-(self.size.width / 6));
+            make.width.mas_equalTo(self.size.width / 3);
+            make.height.mas_equalTo(self.size.height / 3);
+        }];
+        //add view
+        [self.headerFooterview mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(self.imageView.mas_bottom).offset(60);
+            make.left.equalTo(self.view.mas_left);
+            make.width.mas_equalTo(self.view.frame.size.width);
+            make.height.mas_equalTo(self.view.frame.size.height);
+        }];
+    }
 }
 
 @end

+ 2 - 2
PDFViewer/Controller/CPDFHeaderFooterAddView.h

@@ -10,7 +10,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface CPDFHeaderFooterAddView : UIView 
+@interface CPDFHeaderFooterAddView : UIView  <UITextFieldDelegate>
 
 @property (nonatomic,strong) UILabel *localLabel;
 @property (nonatomic,strong) UISegmentedControl *localSegment;
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic,strong) UISlider *colorSlider;
 @property (nonatomic,strong) UILabel *pageNumberLabel;
 @property (nonatomic,strong) UITextField *pageNumberText;
-@property (nonatomic,strong) CPDFDropDownView *dropdownView;
+//@property (nonatomic,strong) CPDFDropDownView *dropdownView;
 @property (nonatomic,strong) UILabel *fontSizeLabel;
 @property (nonatomic,strong) UITextField *fontSizeText;
 @property (nonatomic,strong) UILabel *pageIndexLabel;

+ 143 - 30
PDFViewer/Controller/CPDFHeaderFooterAddView.m

@@ -6,89 +6,197 @@
 //
 
 #import "CPDFHeaderFooterAddView.h"
+#import "Masonry.h"
 
 @implementation CPDFHeaderFooterAddView
 
 - (instancetype)initWithFrame:(CGRect)frame {
     self = [super initWithFrame:frame];
-    CGFloat height = self.bounds.size.height / 15 - 35;
-    CGFloat width  = self.bounds.size.width / 4 - 10;
     CGFloat offsetx = 3.5;
     if (self) {
         //Page number location
-        _localLabel = [[UILabel alloc] initWithFrame:CGRectMake(offsetx, offsetx, width * 2, height)];
+        _localLabel = [[UILabel alloc] init];
         [_localLabel setText:@"Page number position"];
         _localLabel.font = [UIFont boldSystemFontOfSize:12];
         NSArray *arraySegmmentL = [NSArray arrayWithObjects:@"Header",@"Footer", nil];
         _localSegment = [[UISegmentedControl alloc] initWithItems:arraySegmmentL];
-        _localSegment.frame = CGRectMake(4 * offsetx, height + 2 * offsetx, self.bounds.size.width - 8 * offsetx, height * 2);
         [self addSubview:_localLabel];
         [self addSubview:_localSegment];
+        [_localLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(self.mas_top).offset(offsetx);
+            make.left.equalTo(self.mas_left).offset(offsetx);
+            make.width.mas_equalTo(130);
+            make.height.mas_equalTo(22);
+        }];
+        [_localSegment mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_localLabel.mas_bottom).offset(offsetx);
+            make.left.equalTo(self.mas_left).offset(4 * offsetx);
+            make.width.mas_equalTo(364);
+            make.height.mas_equalTo(44);
+        }];
+        
+        
         //alignment
-        _alignmentLabel = [[UILabel alloc] initWithFrame:CGRectMake(3.5, 3 * height + 3 * offsetx, width, height)];
+        _alignmentLabel = [[UILabel alloc] init];
         [_alignmentLabel setText:@"alignment"];
         _alignmentLabel.font = [UIFont boldSystemFontOfSize:12];
         NSArray *arraySegmmentA = [NSArray arrayWithObjects:@"Left",@"Center",@"Right", nil];
         _aligbmentSegment = [[UISegmentedControl alloc] initWithItems:arraySegmmentA];
-        _aligbmentSegment.frame = CGRectMake(4 * offsetx, 4 * height + 4 * offsetx, self.bounds.size.width - 8 * offsetx, height * 2);
         [self addSubview:_alignmentLabel];
         [self addSubview:_aligbmentSegment];
+        [_alignmentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_localSegment.mas_bottom).offset(offsetx);
+            make.left.equalTo(self.mas_left).offset(offsetx);
+            make.width.mas_equalTo(100);
+            make.height.mas_equalTo(22);
+        }];
+        [_aligbmentSegment mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_alignmentLabel.mas_bottom).offset(offsetx);
+            make.left.equalTo(self.mas_left).offset(4 * offsetx);
+            make.width.mas_equalTo(364);
+            make.height.mas_equalTo(44);
+        }];
+        
+        
         //font color
-        _colorLabel = [[UILabel alloc] initWithFrame:CGRectMake(3.5, 6 * height + 5 * offsetx, width, height)];
+        _colorLabel = [[UILabel alloc] init];
         [_colorLabel setText:@"Font Color"];
         _colorLabel.font = [UIFont boldSystemFontOfSize:12];
-        _colerImage = [[UIImageView alloc] initWithFrame:CGRectMake(4 * offsetx,7 * height + 6 * offsetx , self.bounds.size.width, 2*height)];
+        _colerImage = [[UIImageView alloc] init];
+        CALayer *layer = [_colerImage layer];
+        layer.borderColor = [[UIColor blackColor] CGColor];
+        layer.borderWidth = 0.5f;
         _colerImage.image = [UIImage imageNamed:@"text_color_bar"];
-        _colorSlider = [[UISlider alloc] initWithFrame:CGRectMake(4 * offsetx,9 * height + 7 * offsetx , self.bounds.size.width - 8 * offsetx, 2 * height)];
+        _colorSlider = [[UISlider alloc] init];
         _colorSlider.minimumValue = 0;
-        _colorSlider.maximumValue = 90;
+        _colorSlider.maximumValue = 100;
         _colorSlider.value = 5;
         [self addSubview:_colorLabel];
         [self addSubview:_colorSlider];
         [self addSubview:_colerImage];
+        [_colorLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_aligbmentSegment.mas_bottom).offset(offsetx);
+            make.left.equalTo(self.mas_left).offset(offsetx);
+            make.width.mas_equalTo(100);
+            make.height.mas_equalTo(22);
+            //make.bottom.equalTo(_colerImage.mas_top).offset(-offsetx);
+        }];
+        [_colerImage mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_colorLabel.mas_bottom).offset(offsetx);
+            make.left.equalTo(self.mas_left).offset(4 * offsetx);
+            make.width.mas_equalTo(364);
+            make.height.mas_equalTo(44);
+            //make.bottom.equalTo(_colorSlider.mas_top).offset(-offsetx);
+        }];
+        [_colorSlider mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_colerImage.mas_bottom).offset(offsetx);
+            make.left.equalTo(self.mas_left).offset(4 * offsetx);
+            make.width.mas_equalTo(364);
+            make.height.mas_equalTo(44);
+            //make.bottom.equalTo(_pageNumberLabel.mas_top).offset(-offsetx);
+        }];
+        
+        
         //page number
-        _pageNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(3.5, 11 * height + 8 * offsetx, width + offsetx, height * 2)];
+        _pageNumberLabel = [[UILabel alloc] init];
         [_pageNumberLabel setText:@"Page Text"];
         _pageNumberLabel.font = [UIFont boldSystemFontOfSize:14];
-        NSArray *str = [[NSArray alloc] initWithObjects:@"1",@"第1页", nil];
-        _dropdownView = [[CPDFDropDownView alloc] initWithFrame:CGRectMake(2 * offsetx + width, 11 * height + 8 * offsetx, width - offsetx, height * 2) WithString:str];
-        [self addSubview:_dropdownView];
+       // NSArray *str = [[NSArray alloc] initWithObjects:@"1",@"第1页", nil];
+        //_dropdownView = [[CPDFDropDownView alloc] init];
+        _pageNumberText = [[UITextField alloc] init];
+        _pageNumberText.borderStyle = UITextBorderStyleRoundedRect;
+        _pageNumberText.placeholder = @"text";
         [self addSubview:_pageNumberLabel];
+        [self addSubview:_pageNumberText];
+        [_pageNumberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_colorSlider.mas_bottom).offset(offsetx);
+            make.left.equalTo(self.mas_left).offset(offsetx);
+            //make.right.equalTo(_pageNumberText.mas_left).offset(-offsetx);
+            make.height.mas_equalTo(44);
+            make.width.mas_equalTo(73);
+            //make.bottom.equalTo(_dropdownView.mas_top).offset(-offsetx);
+        }];
+        [_pageNumberText mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_colorSlider.mas_bottom).offset(offsetx);
+            make.left.equalTo(_pageNumberLabel.mas_right).offset(offsetx);
+            //make.right.equalTo(_fontSizeLabel.mas_left).offset(-offsetx);
+            make.height.mas_equalTo(44);
+            make.width.mas_equalTo(93);
+            //make.bottom.equalTo(_pageIndexNumberLabel.mas_top).offset(-offsetx);
+        }];
+        
+        
         //font size
-        _fontSizeLabel = [[UILabel alloc] initWithFrame:CGRectMake(3 * offsetx + width * 2, 11 * height + 8 * offsetx, width, height * 2)];
+        _fontSizeLabel = [[UILabel alloc] init];
         [_fontSizeLabel setText:@"Font Szie"];
         _fontSizeLabel.font = [UIFont boldSystemFontOfSize:14];
-        _fontSizeText = [[UITextField alloc] initWithFrame:CGRectMake(2 * offsetx + 3 * width, 11 * height + 8 * offsetx, width, height * 2)];
+        _fontSizeText = [[UITextField alloc] init];
         _fontSizeText.borderStyle = UITextBorderStyleRoundedRect;
+        _fontSizeText.placeholder = @"10.0";
+        _fontSizeText.keyboardType = UIKeyboardTypeDefault;
+        _fontSizeText.delegate = self;
         [self addSubview:_fontSizeLabel];
         [self addSubview:_fontSizeText];
+        [_fontSizeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_colorSlider.mas_bottom).offset(offsetx);
+            make.left.equalTo(_pageNumberText.mas_right).offset(offsetx + 20);
+            //make.right.equalTo(_fontSizeText.mas_left).offset(-offsetx);
+            make.height.mas_equalTo(44);
+            make.width.mas_equalTo(73);
+            //make.bottom.equalTo(_pageIndexNumberStepper.mas_top).offset(-offsetx);
+        }];
+        [_fontSizeText mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_colorSlider.mas_bottom).offset(offsetx);
+            make.left.equalTo(_fontSizeLabel.mas_right).offset(offsetx);
+            //make.right.equalTo(self.mas_left).offset(-offsetx);
+            make.height.mas_equalTo(44);
+            make.width.mas_equalTo(93);
+        }];
+        
+        
         //font index
-        _pageIndexLabel = [[UILabel alloc] initWithFrame:CGRectMake(offsetx, 13 * height + 9 * offsetx, width, height * 2)];
-        [_pageIndexLabel setText:@"Page Star"];
+        _pageIndexLabel = [[UILabel alloc] init];
+        [_pageIndexLabel setText:@"Page Start"];
         _pageIndexLabel.font = [UIFont boldSystemFontOfSize:14];
-        _pageIndexNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(offsetx + width, 13 * height + 10 * offsetx, width, height * 2)];
+        _pageIndexNumberLabel = [[UILabel alloc] init];
         _pageIndexNumberLabel.backgroundColor = [UIColor whiteColor];
         _pageIndexNumberLabel.textColor = [UIColor blackColor];
         _pageIndexNumberLabel.textAlignment = NSTextAlignmentCenter;
-        _pageIndexNumberStepper = [[UIStepper alloc] initWithFrame:CGRectMake(offsetx + width * 2, 13 * height + 11 * offsetx, width, height * 2)];
+        _pageIndexNumberStepper = [[UIStepper alloc] init];
         // The step value is updated in real time as the user interacts
-        _pageIndexNumberStepper.continuous = YES; // default = YES
-        // The user continues to press and hold, automatically increasing or decreasing
-        _pageIndexNumberStepper.autorepeat = YES; // default = YES
-        // If set to YES, the value loops between min <-> max
-        _pageIndexNumberStepper.wraps = NO; // default = NO
-        _pageIndexNumberStepper.minimumValue = 1;   // default 0
-        _pageIndexNumberStepper.maximumValue = 100; // default 100
-        _pageIndexNumberStepper.stepValue    = 1;   // default 1
+        _pageIndexNumberStepper.continuous = YES;
+        _pageIndexNumberStepper.autorepeat = YES;
+        _pageIndexNumberStepper.wraps = NO;
+        _pageIndexNumberStepper.minimumValue = 1;
+        _pageIndexNumberStepper.maximumValue = 100;
+        _pageIndexNumberStepper.stepValue    = 1;
         _pageIndexNumberStepper.value = 1;
-        // 设置 Target-Action
         [_pageIndexNumberStepper addTarget:self
                     action:@selector(stepperValueChanged:)
           forControlEvents:UIControlEventValueChanged];
         [self addSubview:_pageIndexLabel];
         [self addSubview:_pageIndexNumberLabel];
         [self addSubview:_pageIndexNumberStepper];
-        
+        [_pageIndexLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_pageNumberLabel.mas_bottom).offset(offsetx);
+            make.left.equalTo(self.mas_left).offset(offsetx);
+            //make.right.equalTo(_pageNumberLabel.mas_left).offset(-offsetx);
+            make.height.mas_equalTo(44);
+            make.width.mas_equalTo(93);
+        }];
+        [_pageIndexNumberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_pageNumberText.mas_bottom).offset(offsetx);
+            make.left.equalTo(_pageIndexLabel.mas_right).offset(offsetx);
+            //make.right.equalTo(_pageIndexNumberStepper.mas_right).offset(-offsetx);
+            make.height.mas_equalTo(44);
+            make.width.mas_equalTo(93);
+        }];
+        [_pageIndexNumberStepper mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_fontSizeLabel.mas_bottom).offset(offsetx);
+            make.left.equalTo(_pageIndexNumberLabel.mas_right).offset(offsetx);
+            make.height.mas_equalTo(44);
+            make.width.mas_equalTo(93);
+        }];
         self.backgroundColor = [UIColor whiteColor];
     }
     return  self;
@@ -101,5 +209,10 @@
     self.pageIndexNumberLabel.text = value;
 }
 
+- (BOOL)textFieldShouldReturn:(UITextField *)textField {
+    [_pageNumberText resignFirstResponder];
+    return YES;
+}
+
 @end
 

+ 1 - 0
PDFViewer/Controller/CPDFViewController.m

@@ -95,6 +95,7 @@
     self.headerFooter = [self.document headerFooter];
     self.headerFooter.pageString = @"1";
     [self.headerFooter setText:@"1" atIndex:self.modelData.fontPosition];
+    [self.headerFooter setFontSize:self.modelData.fontSize atIndex:self.modelData.fontPosition];
     [self.headerFooter setTextColor:self.modelData.fontColor atIndex:self.modelData.fontPosition];
     [self.headerFooter update];
     NSURL *url = [NSURL fileURLWithPath:self.path];

+ 0 - 26
PDFViewer/Masonry/Info.plist

@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
-	<key>CFBundleExecutable</key>
-	<string>$(EXECUTABLE_NAME)</string>
-	<key>CFBundleIdentifier</key>
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>$(PRODUCT_NAME)</string>
-	<key>CFBundlePackageType</key>
-	<string>FMWK</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>$(CURRENT_PROJECT_VERSION)</string>
-	<key>NSPrincipalClass</key>
-	<string></string>
-</dict>
-</plist>