Преглед на файлове

PDFEdit(iOS) - 透明度下拉菜单更新

chenyu преди 1 година
родител
ревизия
84a4c089ac

+ 8 - 0
compdfkit-tools/compdfkit-tools.xcodeproj/project.pbxproj

@@ -24,6 +24,8 @@
 		4F1131BB29F911A800950564 /* CPDFTextPropertyCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F1131B829F911A800950564 /* CPDFTextPropertyCell.m */; };
 		4F1131BC29F911A800950564 /* CPDFTextPropertyCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F1131B929F911A800950564 /* CPDFTextPropertyCell.xib */; };
 		4F1131BE29F9232300950564 /* CPDFEditImageAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F1131BD29F9232300950564 /* CPDFEditImageAssets.xcassets */; };
+		4F5986912A03411700F06A1B /* CPDFDropDownMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F59868F2A03411700F06A1B /* CPDFDropDownMenu.h */; };
+		4F5986922A03411700F06A1B /* CPDFDropDownMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F5986902A03411700F06A1B /* CPDFDropDownMenu.m */; };
 		4F6C796A29FBD532008C9501 /* CPDFEditFontNameSelectView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F6C796829FBD532008C9501 /* CPDFEditFontNameSelectView.h */; };
 		4F6C796B29FBD532008C9501 /* CPDFEditFontNameSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F6C796929FBD532008C9501 /* CPDFEditFontNameSelectView.m */; };
 		C918CE8129F621E200D43974 /* CPDFColorPickerView.h in Headers */ = {isa = PBXBuildFile; fileRef = C918CE7F29F621E200D43974 /* CPDFColorPickerView.h */; };
@@ -169,6 +171,8 @@
 		4F1131B829F911A800950564 /* CPDFTextPropertyCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFTextPropertyCell.m; sourceTree = "<group>"; };
 		4F1131B929F911A800950564 /* CPDFTextPropertyCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CPDFTextPropertyCell.xib; sourceTree = "<group>"; };
 		4F1131BD29F9232300950564 /* CPDFEditImageAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = CPDFEditImageAssets.xcassets; sourceTree = "<group>"; };
+		4F59868F2A03411700F06A1B /* CPDFDropDownMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFDropDownMenu.h; sourceTree = "<group>"; };
+		4F5986902A03411700F06A1B /* CPDFDropDownMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFDropDownMenu.m; sourceTree = "<group>"; };
 		4F6C796829FBD532008C9501 /* CPDFEditFontNameSelectView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFEditFontNameSelectView.h; sourceTree = "<group>"; };
 		4F6C796929FBD532008C9501 /* CPDFEditFontNameSelectView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFEditFontNameSelectView.m; sourceTree = "<group>"; };
 		C918CE7F29F621E200D43974 /* CPDFColorPickerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFColorPickerView.h; sourceTree = "<group>"; };
@@ -441,6 +445,8 @@
 				C9B9EC4F29F52DCC00C6A5D2 /* AAPLCustomPresentationController.m */,
 				F38F60C429EFF0C1008098F8 /* CPDFColorUtils.h */,
 				F38F60C529EFF0C1008098F8 /* CPDFColorUtils.m */,
+				4F59868F2A03411700F06A1B /* CPDFDropDownMenu.h */,
+				4F5986902A03411700F06A1B /* CPDFDropDownMenu.m */,
 			);
 			path = Utils;
 			sourceTree = "<group>";
@@ -815,6 +821,7 @@
 				F32DA18129ED904300E19ECA /* CNavigationRightView.h in Headers */,
 				C918CE8129F621E200D43974 /* CPDFColorPickerView.h in Headers */,
 				F32DA16A29ED904300E19ECA /* CPDFSearchViewCell.h in Headers */,
+				4F5986912A03411700F06A1B /* CPDFDropDownMenu.h in Headers */,
 				F32DA18529ED904300E19ECA /* CActivityIndicatorView.h in Headers */,
 				4F06AB5529F6792E007797E4 /* CPDFEditToolBar.h in Headers */,
 				F32DA17E29ED904300E19ECA /* CPDFBOTAViewController.h in Headers */,
@@ -970,6 +977,7 @@
 				C918CEE429FBA41A00D43974 /* CPDFDrawArrowView.m in Sources */,
 				F32DA16929ED904300E19ECA /* CPDFSearchResultsViewController.m in Sources */,
 				F32DA16D29ED904300E19ECA /* CPDFSearchViewCell.m in Sources */,
+				4F5986922A03411700F06A1B /* CPDFDropDownMenu.m in Sources */,
 				F32DA16429ED904300E19ECA /* CPDFOutlineViewCell.m in Sources */,
 				F382636A29EFD0D9003F1DFD /* CPDFSlider.m in Sources */,
 				4F06AB5029F6792E007797E4 /* CPDFTextProperty.m in Sources */,

+ 55 - 0
compdfkit-tools/compdfkit-tools/Common/Utils/CPDFDropDownMenu.h

@@ -0,0 +1,55 @@
+//
+//  CPDFDropDownMenu.h
+//  compdfkit-tools
+//
+//  Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import <UIKit/UIKit.h>
+
+@class CPDFDropDownMenu;
+
+@protocol CPDFDropDownMenuDelegate <NSObject>
+
+- (void)dropDownMenu:(CPDFDropDownMenu*)menu didEditWithText:(NSString*)text;
+- (void)dropDownMenu:(CPDFDropDownMenu*)menu didSelectWithIndex:(NSInteger)index;
+
+@end
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface CPDFDropDownMenu : UIView
+
+@property (nonatomic, assign) id<CPDFDropDownMenuDelegate> delegate;
+
+@property (nonatomic, strong) NSMutableArray * options;
+
+@property (nonatomic, assign) CGFloat rowHeight;
+
+@property (nonatomic, assign) CGFloat menuHeight;
+
+@property (nonatomic, assign) BOOL editable;
+
+@property (nonatomic, strong) UIImage * buttonImage;
+
+@property (nonatomic, copy)   NSString * placeHolder;
+
+@property (nonatomic, copy)   NSString * defaultValue;
+
+@property (nonatomic, strong) UIColor * textColor;
+
+@property (nonatomic, strong) UIFont  * font;
+
+@property (nonatomic, assign) BOOL  showBorder;
+
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 215 - 0
compdfkit-tools/compdfkit-tools/Common/Utils/CPDFDropDownMenu.m

@@ -0,0 +1,215 @@
+//
+//  CPDFDropDownMenu.m
+//  compdfkit-tools
+//
+//  Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import "CPDFDropDownMenu.h"
+
+@interface CPDFDropDownMenu()<UITextFieldDelegate,UITableViewDelegate,UITableViewDataSource>
+
+@property (nonatomic, strong) UITableView * optionList;
+
+@property (nonatomic, strong) UIButton    * pullDownButton;
+
+@property (nonatomic, assign) BOOL        isShown;
+
+@property (nonatomic, assign) CGFloat     menuMaxHeight;
+
+@property (nonatomic, strong) UITextField * contextField;
+
+@end
+
+@implementation CPDFDropDownMenu
+
+- (instancetype)initWithFrame:(CGRect)frame{
+    if (self = [super initWithFrame:frame]) {
+        [self setUp];
+    }
+    return self;
+}
+
+- (void)setUp{
+    self.contextField = [[UITextField alloc] initWithFrame:CGRectZero];
+    self.contextField.delegate = self;
+    self.contextField.enabled = YES;
+    self.contextField.textColor = [UIColor darkGrayColor];
+    [self addSubview:self.contextField];
+    
+    self.pullDownButton = [UIButton buttonWithType:UIButtonTypeCustom];
+    [self.pullDownButton addTarget:self action:@selector(showOrHide) forControlEvents:UIControlEventTouchUpInside];
+    [self.pullDownButton setImage:[UIImage imageNamed:@"CPDFEditDown" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] forState:UIControlStateNormal];
+    [self addSubview:self.pullDownButton];
+    
+    self.showBorder = YES;
+    self.textColor = [UIColor darkGrayColor];
+    self.font  = [UIFont systemFontOfSize:16.];
+    self.rowHeight = 40;
+    self.userInteractionEnabled = YES;
+}
+
+- (void)showOrHide{
+    if(self.isShown){
+        [UIView animateWithDuration:0.3 animations:^{
+            self.pullDownButton.transform = CGAffineTransformMakeRotation(M_PI *2);
+            CGRect frame =  CGRectMake(self.frame.origin.x, self.frame.origin.y + self.frame.size.height - 0.5, self.frame.size.width, 0);
+            CGRect newFrame = [self convertRect:frame toView:self.superview.superview];
+            self.optionList.frame = newFrame;
+                    
+         } completion:^(BOOL finished) {
+             self.pullDownButton.transform = CGAffineTransformMakeRotation(0);
+             self.isShown = false;
+        }];
+    }else{
+        [self.contextField resignFirstResponder];
+        [self.optionList reloadData];
+        
+        [UIView animateWithDuration:0.3 animations:^{
+            self.pullDownButton.transform = CGAffineTransformMakeRotation(M_PI);
+            
+            CGRect frame =  CGRectMake(self.frame.origin.x, self.frame.origin.y + self.frame.size.height - 0.5, self.frame.size.width, self.menuHeight);
+            CGRect newFrame = [self convertRect:frame toView:self.superview.superview];
+            
+            self.optionList.frame  = newFrame;
+                    
+          } completion:^(BOOL finished) {
+              self.isShown = true;
+        }];
+    }
+    
+}
+
+- (void)setShowBorder:(BOOL)showBorder {
+    _showBorder = showBorder;
+    if(self.showBorder){
+        self.layer.borderColor = [UIColor lightGrayColor].CGColor;
+        self.layer.borderWidth = 0.5;
+        self.layer.masksToBounds = YES;
+        self.layer.cornerRadius = 2.5;
+    }else{
+        self.layer.borderColor = [UIColor clearColor].CGColor;
+        self.layer.masksToBounds = NO;
+        self.layer.cornerRadius = 0;
+        self.layer.borderWidth = 0;
+    }
+    
+}
+
+#pragma mark - Setter and Getter
+- (void)setMenuHeight:(CGFloat)menuHeight{
+    _menuHeight = menuHeight;
+    [self reloadData];
+}
+
+- (void)setRowHeight:(CGFloat)rowHeight{
+    _rowHeight = rowHeight;
+    [self reloadData];
+}
+
+- (void)setOptions:(NSMutableArray *)options{
+    _options = options;
+    [self reloadData];
+}
+
+- (void)setDefaultValue:(NSString *)defaultValue{
+    _defaultValue = defaultValue;
+    self.contextField.text = defaultValue;
+}
+
+- (void)reloadData{
+    if(!self.isShown){
+        return;
+    }
+    
+    [self.optionList reloadData];
+    
+    [UIView animateWithDuration:0.3 animations:^{
+        self.pullDownButton.transform = CGAffineTransformMakeRotation(M_PI);
+        CGRect frame =  CGRectMake(self.frame.origin.x, self.frame.origin.y + self.frame.size.height - 0.5, self.frame.size.width, self.menuHeight);
+        CGRect newFrame = [self convertRect:frame toView:self.superview.superview];
+        
+        self.optionList.frame  = newFrame;
+    }];
+}
+
+- (void)layoutSubviews{
+    [super layoutSubviews];
+    self.contextField.frame = CGRectMake(15, 5, self.frame.size.width - 50, self.frame.size.height - 10);
+    self.pullDownButton.frame = CGRectMake(self.frame.size.width - 35, 0, 30, 30);
+
+}
+
+#pragma mark - listView
+- (UITableView *)optionList{
+    if(!_optionList){
+        CGRect frame = CGRectMake(self.frame.origin.x, self.frame.origin.y + self.frame.size.height, self.frame.size.width, 0);
+        CGRect newFrame = [self convertRect:frame toView:self.superview.superview];
+        _optionList = [[UITableView alloc]initWithFrame:newFrame style:UITableViewStylePlain];
+        _optionList.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1.0];
+        _optionList.delegate = self;
+        _optionList.dataSource = self;
+        _optionList.layer.borderColor = [UIColor lightGrayColor].CGColor;
+        _optionList.layer.borderWidth = 0.5;
+        _optionList.allowsSelection = YES;
+        [self.superview.superview addSubview:_optionList];
+    }
+    
+    return _optionList;
+}
+
+#pragma mark - UITextFieldDelegate
+- (BOOL)textFieldShouldReturn:(UITextField *)textField{
+    if(textField.text.length > 0){
+        self.defaultValue = textField.text;
+        if(self.delegate  && [self.delegate respondsToSelector:@selector(dropDownMenu:didEditWithText:)]){
+            [self.delegate dropDownMenu:self didEditWithText:textField.text];
+        }
+    }
+    
+    return YES;
+}
+
+#pragma mark - UItableViewDelegate + UITableViewDataSource
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.options.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString * reuseIdentifier = @"tableViewIdentifier";
+    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
+    if(!cell){
+        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
+    };
+    cell.textLabel.text = self.options[indexPath.row];
+    cell.textLabel.font = self.font;
+    cell.textLabel.textColor = self.textColor;
+    cell.userInteractionEnabled = YES;
+
+    
+    return cell;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return self.rowHeight;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    self.contextField.text = self.options[indexPath.row];
+    self.defaultValue = self.contextField.text;
+    if(self.delegate && [self.delegate respondsToSelector:@selector(dropDownMenu:didSelectWithIndex:)]) {
+        [self.delegate dropDownMenu:self didSelectWithIndex:indexPath.row];
+    }
+    [self showOrHide];
+}
+
+@end

+ 30 - 0
compdfkit-tools/compdfkit-tools/Edit/CPDFEditCell/CPDFImagePropertyCell.m

@@ -8,9 +8,14 @@
 //
 
 #import "CPDFImagePropertyCell.h"
+#import "CPDFDropDownMenu.h"
 
 @interface CPDFImagePropertyCell()
 
+@property (weak, nonatomic) IBOutlet UIView *opacityView;
+@property (nonatomic, strong) CPDFDropDownMenu * menu;
+@property (weak, nonatomic) IBOutlet UISlider *transparencySlider;
+
 @end
 
 @implementation CPDFImagePropertyCell
@@ -26,6 +31,13 @@
 - (void)awakeFromNib {
     [super awakeFromNib];
     // Initialization code
+    self.menu = [[CPDFDropDownMenu alloc] initWithFrame:self.opacityView.bounds];
+    [self.opacityView addSubview:self.menu];
+    
+    self.menu.options = [[NSMutableArray alloc]initWithObjects:@"1.0",@"0.75",@"0.5",@"0.25",nil];
+    self.menu.menuHeight = 200;
+    
+    self.transparencySlider.value = 0.;
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
@@ -34,6 +46,7 @@
     // Configure the view for the selected state
 }
 
+
 #pragma mark - Action
 - (IBAction)horizontalAction:(UIButton *)sender {
     sender.selected = !sender.selected;
@@ -43,5 +56,22 @@
     sender.selected = !sender.selected;
 }
 
+- (IBAction)replaceImageAction:(UIButton *)sender {
+}
+
+- (IBAction)importImageAction:(UIButton *)sender {
+}
+
+- (IBAction)cropImageAction:(UIButton *)sender {
+}
+
+- (IBAction)addImageAction:(UIButton *)sender {
+}
+
+- (IBAction)sliderAction:(UISlider *)sender {
+    self.menu.defaultValue = [NSString stringWithFormat:@"%.2f",sender.value];
+}
+
+
 
 @end

+ 33 - 7
compdfkit-tools/compdfkit-tools/Edit/CPDFEditCell/CPDFImagePropertyCell.xib

@@ -5,6 +5,7 @@
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -81,12 +82,10 @@
                     </label>
                     <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="7i1-sQ-oZ3">
                         <rect key="frame" x="38" y="193" width="118" height="34"/>
+                        <connections>
+                            <action selector="sliderAction:" destination="KGk-i7-Jjw" eventType="valueChanged" id="tpe-nm-1Fm"/>
+                        </connections>
                     </slider>
-                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Tru-zG-DMC">
-                        <rect key="frame" x="231.66666666666666" y="193" width="81.333333333333343" height="35"/>
-                        <state key="normal" title="Button"/>
-                        <buttonConfiguration key="configuration" style="plain" title="Vertical"/>
-                    </button>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Replace image:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A5n-Aq-3ze">
                         <rect key="frame" x="39.999999999999993" y="256" width="116.33333333333331" height="21"/>
                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
@@ -127,6 +126,9 @@
                         </constraints>
                         <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                         <state key="normal" image="CPDFEditImageDefault"/>
+                        <connections>
+                            <action selector="replaceImageAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="846-yh-DUt"/>
+                        </connections>
                     </button>
                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ce0-Af-lyc">
                         <rect key="frame" x="268" y="306" width="25" height="25"/>
@@ -136,6 +138,9 @@
                         </constraints>
                         <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                         <state key="normal" image="CPDFEditExport"/>
+                        <connections>
+                            <action selector="importImageAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="CQN-Yv-mZA"/>
+                        </connections>
                     </button>
                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x97-GO-glq">
                         <rect key="frame" x="268" y="358" width="25" height="25"/>
@@ -145,6 +150,9 @@
                         </constraints>
                         <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                         <state key="normal" image="CPDFEditCrop"/>
+                        <connections>
+                            <action selector="cropImageAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="VEq-jz-mQ2"/>
+                        </connections>
                     </button>
                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qv3-jL-TFl">
                         <rect key="frame" x="268" y="410" width="25" height="25"/>
@@ -154,6 +162,9 @@
                         </constraints>
                         <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                         <state key="normal" image="CPDFEditAdd"/>
+                        <connections>
+                            <action selector="addImageAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="dkF-0j-uLY"/>
+                        </connections>
                     </button>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S1c-pL-3pg">
                         <rect key="frame" x="40" y="287" width="283" height="1"/>
@@ -162,6 +173,14 @@
                             <constraint firstAttribute="height" constant="1" id="x36-UJ-jKZ"/>
                         </constraints>
                     </view>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="psP-AR-tkD">
+                        <rect key="frame" x="193" y="194.66666666666666" width="150" height="30"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="30" id="tvQ-90-UpW"/>
+                            <constraint firstAttribute="width" constant="150" id="wjq-BB-pNZ"/>
+                        </constraints>
+                    </view>
                 </subviews>
                 <constraints>
                     <constraint firstItem="aRx-DE-HGO" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="40" id="1c9-Ay-ldg"/>
@@ -170,7 +189,7 @@
                     <constraint firstItem="n2j-U4-BXE" firstAttribute="top" secondItem="aRx-DE-HGO" secondAttribute="bottom" constant="10" id="38m-hu-VhR"/>
                     <constraint firstItem="S1c-pL-3pg" firstAttribute="top" secondItem="A5n-Aq-3ze" secondAttribute="bottom" constant="10" id="3Eh-Ot-Aj5"/>
                     <constraint firstItem="Iar-AU-dds" firstAttribute="leading" secondItem="Zt5-QF-WOf" secondAttribute="leading" id="5vO-p9-eas"/>
-                    <constraint firstItem="Tru-zG-DMC" firstAttribute="top" secondItem="7i1-sQ-oZ3" secondAttribute="top" id="6bn-b5-aKo"/>
+                    <constraint firstItem="psP-AR-tkD" firstAttribute="centerY" secondItem="7i1-sQ-oZ3" secondAttribute="centerY" id="62i-6G-KNg"/>
                     <constraint firstItem="QeB-oD-MRy" firstAttribute="top" secondItem="Iar-AU-dds" secondAttribute="bottom" constant="10" id="6dW-5u-uxX"/>
                     <constraint firstItem="qhu-MQ-xkY" firstAttribute="height" secondItem="S1c-pL-3pg" secondAttribute="height" id="6ka-2Y-ybh"/>
                     <constraint firstItem="QIY-I8-jze" firstAttribute="top" secondItem="n2j-U4-BXE" secondAttribute="top" id="8E9-ad-bk7"/>
@@ -192,7 +211,6 @@
                     <constraint firstItem="QeB-oD-MRy" firstAttribute="trailing" secondItem="qhu-MQ-xkY" secondAttribute="trailing" id="P0J-4o-qnt"/>
                     <constraint firstItem="KHd-Dh-MMI" firstAttribute="top" secondItem="who-Mn-OKt" secondAttribute="bottom" constant="20" id="PLg-Ki-QbW"/>
                     <constraint firstItem="S1c-pL-3pg" firstAttribute="top" secondItem="A5n-Aq-3ze" secondAttribute="bottom" constant="10" id="PoD-ic-BaC"/>
-                    <constraint firstAttribute="trailing" secondItem="Tru-zG-DMC" secondAttribute="trailing" constant="40" id="PvU-B2-Dyx"/>
                     <constraint firstItem="epi-iZ-bX6" firstAttribute="centerY" secondItem="A5n-Aq-3ze" secondAttribute="centerY" id="RB7-P9-5Dj"/>
                     <constraint firstItem="7i1-sQ-oZ3" firstAttribute="width" secondItem="H2p-sc-9uM" secondAttribute="width" multiplier="0.322946" id="S3Y-Tv-J9H"/>
                     <constraint firstAttribute="trailing" secondItem="dA7-GZ-Kj2" secondAttribute="trailing" constant="50" id="Tcj-yM-Vgh"/>
@@ -202,6 +220,7 @@
                     <constraint firstItem="who-Mn-OKt" firstAttribute="top" secondItem="2Bf-8k-BNs" secondAttribute="bottom" constant="10" id="Zfa-wv-E8I"/>
                     <constraint firstItem="49a-VY-aZG" firstAttribute="leading" secondItem="QeB-oD-MRy" secondAttribute="leading" id="bzJ-3q-Q62"/>
                     <constraint firstItem="QeB-oD-MRy" firstAttribute="leading" secondItem="qhu-MQ-xkY" secondAttribute="leading" id="kSe-pK-Fbt"/>
+                    <constraint firstItem="psP-AR-tkD" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" constant="10" id="mqM-Xv-FhL"/>
                     <constraint firstItem="qv3-jL-TFl" firstAttribute="centerY" secondItem="49a-VY-aZG" secondAttribute="centerY" id="nFz-Eg-SvV"/>
                     <constraint firstItem="Zt5-QF-WOf" firstAttribute="leading" secondItem="A5n-Aq-3ze" secondAttribute="leading" id="o5K-qj-6aH"/>
                     <constraint firstItem="7i1-sQ-oZ3" firstAttribute="leading" secondItem="KHd-Dh-MMI" secondAttribute="leading" id="q23-QR-FRp"/>
@@ -214,6 +233,10 @@
                 </constraints>
             </tableViewCellContentView>
             <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+            <connections>
+                <outlet property="opacityView" destination="psP-AR-tkD" id="1b9-NG-7eu"/>
+                <outlet property="transparencySlider" destination="7i1-sQ-oZ3" id="0yc-Qb-e3f"/>
+            </connections>
             <point key="canvasLocation" x="67.938931297709928" y="142.25352112676057"/>
         </tableViewCell>
     </objects>
@@ -228,5 +251,8 @@
         <image name="CPDFEditRRotate" width="41" height="41"/>
         <image name="CPDFEditVerticalFlip" width="21" height="21"/>
         <image name="CPDFEditVerticalFlipH" width="21" height="21"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
     </resources>
 </document>

+ 0 - 1
compdfkit-tools/compdfkit-tools/Edit/CPDFEditCell/CPDFTextPropertyCell.m

@@ -77,7 +77,6 @@
 
 #pragma mark - OPacitySliderView
 - (void)opacitySliderView:(CPDFOpacitySliderView *)opacitySliderView opacity:(CGFloat)opacity {
-    NSLog(@"Opacity Slider! opacity%f",opacity);
 }
 
 #pragma mark - Action

+ 21 - 0
compdfkit-tools/compdfkit-tools/Edit/CPDFEditImageAssets.xcassets/CPDFEditDown.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "default_down.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
compdfkit-tools/compdfkit-tools/Edit/CPDFEditImageAssets.xcassets/CPDFEditDown.imageset/default_down.png