|
@@ -101,13 +101,6 @@
|
|
self.textFiledView.delegate = self;
|
|
self.textFiledView.delegate = self;
|
|
[self.scrcollView addSubview:self.textFiledView];
|
|
[self.scrcollView addSubview:self.textFiledView];
|
|
|
|
|
|
-// self.hideFormView = [[CPDFFormSwitchView alloc] init];
|
|
|
|
-// self.hideFormView.delegate = self;
|
|
|
|
-// self.hideFormView.titleLabel.font = [UIFont boldSystemFontOfSize:13.0];
|
|
|
|
-// self.hideFormView.titleLabel.textColor = [UIColor colorWithRed:153/255. green:153/255. blue:153/255. alpha:1];
|
|
|
|
-// self.hideFormView.titleLabel.text = NSLocalizedString(@"Hide The Field", nil);
|
|
|
|
-// [self.scrcollView addSubview:self.hideFormView];
|
|
|
|
-
|
|
|
|
self.fontSettingView = [[CPDFFontSettingView alloc] init];
|
|
self.fontSettingView = [[CPDFFontSettingView alloc] init];
|
|
self.fontSettingView.fontNameLabel.font = [UIFont boldSystemFontOfSize:13.0];
|
|
self.fontSettingView.fontNameLabel.font = [UIFont boldSystemFontOfSize:13.0];
|
|
self.fontSettingView.fontNameLabel.textColor = [UIColor colorWithRed:153/255. green:153/255. blue:153/255. alpha:1];
|
|
self.fontSettingView.fontNameLabel.textColor = [UIColor colorWithRed:153/255. green:153/255. blue:153/255. alpha:1];
|
|
@@ -233,7 +226,18 @@
|
|
}
|
|
}
|
|
|
|
|
|
- (void)updatePreferredContentSizeWithTraitCollection:(UITraitCollection *)traitCollection {
|
|
- (void)updatePreferredContentSizeWithTraitCollection:(UITraitCollection *)traitCollection {
|
|
- self.preferredContentSize = CGSizeMake(self.view.bounds.size.width, traitCollection.verticalSizeClass == UIUserInterfaceSizeClassCompact ? 350 : 600);
|
|
|
|
|
|
+ if ([self.colorPicker superview]) {
|
|
|
|
+ UIDevice *currentDevice = [UIDevice currentDevice];
|
|
|
|
+ if (currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) {
|
|
|
|
+ // This is an iPad
|
|
|
|
+ self.preferredContentSize = CGSizeMake(self.view.bounds.size.width, 520);
|
|
|
|
+ } else {
|
|
|
|
+ // This is an iPhone or iPod touch
|
|
|
|
+ self.preferredContentSize = CGSizeMake(self.view.bounds.size.width, 320);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ self.preferredContentSize = CGSizeMake(self.view.bounds.size.width, traitCollection.verticalSizeClass == UIUserInterfaceSizeClassCompact ? 350 : 600);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
- (void)viewWillLayoutSubviews {
|
|
- (void)viewWillLayoutSubviews {
|
|
@@ -252,8 +256,6 @@
|
|
|
|
|
|
self.sizeThickNessView.frame = CGRectMake(self.view.safeAreaInsets.left, CGRectGetMaxY(self.fontSettingView.frame),self.view.frame.size.width - self.view.safeAreaInsets.left - self.view.safeAreaInsets.right, 82);
|
|
self.sizeThickNessView.frame = CGRectMake(self.view.safeAreaInsets.left, CGRectGetMaxY(self.fontSettingView.frame),self.view.frame.size.width - self.view.safeAreaInsets.left - self.view.safeAreaInsets.right, 82);
|
|
|
|
|
|
-// self.hideFormView.frame = CGRectMake(self.view.safeAreaInsets.left, CGRectGetMaxY(self.sizeThickNessView.frame) + 8,self.view.frame.size.width - self.view.safeAreaInsets.left - self.view.safeAreaInsets.right, 44);
|
|
|
|
-
|
|
|
|
} else {
|
|
} else {
|
|
self.textFiledView.frame = CGRectMake(0, 8, self.view.bounds.size.width, 60);
|
|
self.textFiledView.frame = CGRectMake(0, 8, self.view.bounds.size.width, 60);
|
|
self.borderColorView.frame = CGRectMake(0,CGRectGetMaxY(self.textFiledView.frame)+8, self.view.frame.size.width, 74);
|
|
self.borderColorView.frame = CGRectMake(0,CGRectGetMaxY(self.textFiledView.frame)+8, self.view.frame.size.width, 74);
|
|
@@ -262,8 +264,6 @@
|
|
self.fontSettingView.frame = CGRectMake(0, CGRectGetMaxY(self.textColorView.frame)+8, self.view.frame.size.width, 30);
|
|
self.fontSettingView.frame = CGRectMake(0, CGRectGetMaxY(self.textColorView.frame)+8, self.view.frame.size.width, 30);
|
|
|
|
|
|
self.sizeThickNessView.frame = CGRectMake(0, CGRectGetMaxY(self.fontSettingView.frame), self.view.frame.size.width, 82);
|
|
self.sizeThickNessView.frame = CGRectMake(0, CGRectGetMaxY(self.fontSettingView.frame), self.view.frame.size.width, 82);
|
|
-
|
|
|
|
-// self.hideFormView.frame = CGRectMake(0, CGRectGetMaxY(self.sizeThickNessView.frame) + 8, self.view.frame.size.width, 44);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
self.textFiledView.contentField.text = self.comboxChoiceWidget.fieldName;
|
|
self.textFiledView.contentField.text = self.comboxChoiceWidget.fieldName;
|
|
@@ -300,11 +300,18 @@
|
|
picker.delegate = self;
|
|
picker.delegate = self;
|
|
[self presentViewController:picker animated:YES completion:nil];
|
|
[self presentViewController:picker animated:YES completion:nil];
|
|
} else {
|
|
} else {
|
|
- self.colorPicker = [[CPDFColorPickerView alloc] initWithFrame:self.view.frame];
|
|
|
|
|
|
+ UIDevice *currentDevice = [UIDevice currentDevice];
|
|
|
|
+ if (currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) {
|
|
|
|
+ // This is an iPad
|
|
|
|
+ _colorPicker = [[CPDFColorPickerView alloc] initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, 520)];
|
|
|
|
+ } else {
|
|
|
|
+ // This is an iPhone or iPod touch
|
|
|
|
+ _colorPicker = [[CPDFColorPickerView alloc] initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, 320)];
|
|
|
|
+ }
|
|
self.colorPicker.delegate = self;
|
|
self.colorPicker.delegate = self;
|
|
- self.colorPicker.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
|
|
self.colorPicker.backgroundColor = [CPDFColorUtils CAnnotationPropertyViewControllerBackgoundColor];
|
|
self.colorPicker.backgroundColor = [CPDFColorUtils CAnnotationPropertyViewControllerBackgoundColor];
|
|
[self.view addSubview:self.colorPicker];
|
|
[self.view addSubview:self.colorPicker];
|
|
|
|
+ [self updatePreferredContentSizeWithTraitCollection:self.traitCollection];
|
|
}
|
|
}
|
|
[self refreshUI];
|
|
[self refreshUI];
|
|
}
|
|
}
|
|
@@ -320,6 +327,7 @@
|
|
}else if(self.currentSelectColorView == self.textColorView) {
|
|
}else if(self.currentSelectColorView == self.textColorView) {
|
|
self.comboxChoiceWidget.fontColor = color;
|
|
self.comboxChoiceWidget.fontColor = color;
|
|
}
|
|
}
|
|
|
|
+ [self updatePreferredContentSizeWithTraitCollection:self.traitCollection];
|
|
[self refreshUI];
|
|
[self refreshUI];
|
|
}
|
|
}
|
|
|
|
|