|
@@ -50,6 +50,8 @@
|
|
|
|
|
|
@property (nonatomic, strong) CAnnotationManage *annotManage;
|
|
|
|
|
|
+@property (nonatomic, strong) CAnnotStyle *annotStyle;
|
|
|
+
|
|
|
@property (nonatomic, strong) CPDFSignatureViewController *signatureVC;
|
|
|
|
|
|
@end
|
|
@@ -58,8 +60,10 @@
|
|
|
|
|
|
#pragma mark - Initializers
|
|
|
|
|
|
-- (instancetype)initPDFView:(CPDFListView *)pdfListView {
|
|
|
+- (instancetype)initAnnotationManage:(CAnnotationManage *)annotationManage {
|
|
|
if (self = [super init]) {
|
|
|
+ self.annotManage = annotationManage;
|
|
|
+
|
|
|
UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];
|
|
|
UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blur];
|
|
|
effectView.frame = self.bounds;
|
|
@@ -73,9 +77,9 @@
|
|
|
|
|
|
self.selectedIndex = -1;
|
|
|
|
|
|
- self.pdfListView = pdfListView;
|
|
|
+ self.pdfListView = annotationManage.pdfListView;
|
|
|
|
|
|
- self.annotManage = [[CAnnotationManage alloc] initWithPDFView:pdfListView];
|
|
|
+ self.annotStyle = [[CAnnotStyle alloc] init];
|
|
|
|
|
|
[self initSubview];
|
|
|
}
|
|
@@ -206,63 +210,77 @@
|
|
|
case CPDFToolbarNote:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeNote;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeNote;
|
|
|
}
|
|
|
break;
|
|
|
case CPDFToolbarHighlight:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeHighlight;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeHighlight;
|
|
|
}
|
|
|
break;
|
|
|
case CPDFToolbarUnderline:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeUnderline;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeUnderline;
|
|
|
}
|
|
|
break;
|
|
|
case CPDFToolbarStrikeout:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeStrikeout;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeStrikeout;
|
|
|
}
|
|
|
break;
|
|
|
case CPDFToolbarSquiggly:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeSquiggly;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeSquiggly;
|
|
|
}
|
|
|
break;
|
|
|
case CPDFToolbarFreehand:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeInk;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeInk;
|
|
|
}
|
|
|
break;
|
|
|
case CPDFToolbarShapeCircle:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeCircle;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeCircle;
|
|
|
}
|
|
|
break;
|
|
|
case CPDFToolbarShapeRectangle:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeSquare;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeSquare;
|
|
|
}
|
|
|
break;
|
|
|
case CPDFToolbarShapeArrow:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeArrow;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeArrow;
|
|
|
}
|
|
|
break;
|
|
|
case CPDFToolbarShapeLine:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeLine;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeLine;
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
{
|
|
|
self.pdfListView.annotationMode = CPDFViewAnnotationModeNone;
|
|
|
+ self.annotStyle.annotMode = CPDFViewAnnotationModeNone;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- (void)buttonItemClicked_open:(UIButton *)button {
|
|
|
+ if (self.pdfListView.activeAnnotations.firstObject) {
|
|
|
+
|
|
|
+ }
|
|
|
CAnnotStyle *annotStytle = [self.annotManage getAnnotStyle];
|
|
|
AAPLCustomPresentationController *presentationController NS_VALID_UNTIL_END_OF_SCOPE;
|
|
|
switch (button.tag) {
|