|
@@ -54,6 +54,8 @@
|
|
[self.centerButton setImage:[UIImage imageNamed:@"CPDFStampTextImageCenter" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] forState:UIControlStateNormal];
|
|
[self.centerButton setImage:[UIImage imageNamed:@"CPDFStampTextImageCenter" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] forState:UIControlStateNormal];
|
|
[self.centerButton addTarget:self action:@selector(buttonItemClicked_select:) forControlEvents:UIControlEventTouchUpInside];
|
|
[self.centerButton addTarget:self action:@selector(buttonItemClicked_select:) forControlEvents:UIControlEventTouchUpInside];
|
|
self.centerButton.tag = 0;
|
|
self.centerButton.tag = 0;
|
|
|
|
+ self.centerButton.layer.cornerRadius = 5.0;
|
|
|
|
+ self.centerButton.layer.masksToBounds = YES;
|
|
[self.shapeView addSubview:self.centerButton];
|
|
[self.shapeView addSubview:self.centerButton];
|
|
[self.buttonArray addObject:self.centerButton];
|
|
[self.buttonArray addObject:self.centerButton];
|
|
|
|
|
|
@@ -63,6 +65,8 @@
|
|
[self.leftButton setImage:[UIImage imageNamed:@"CPDFStampTextImageLeft" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] forState:UIControlStateNormal];
|
|
[self.leftButton setImage:[UIImage imageNamed:@"CPDFStampTextImageLeft" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] forState:UIControlStateNormal];
|
|
[self.leftButton addTarget:self action:@selector(buttonItemClicked_select:) forControlEvents:UIControlEventTouchUpInside];
|
|
[self.leftButton addTarget:self action:@selector(buttonItemClicked_select:) forControlEvents:UIControlEventTouchUpInside];
|
|
self.leftButton.tag = 1;
|
|
self.leftButton.tag = 1;
|
|
|
|
+ self.leftButton.layer.cornerRadius = 5.0;
|
|
|
|
+ self.leftButton.layer.masksToBounds = YES;
|
|
[self.shapeView addSubview:self.leftButton];
|
|
[self.shapeView addSubview:self.leftButton];
|
|
[self.buttonArray addObject:self.leftButton];
|
|
[self.buttonArray addObject:self.leftButton];
|
|
|
|
|
|
@@ -70,6 +74,8 @@
|
|
[self.rightButton setImage:[UIImage imageNamed:@"CPDFStampTextImageRight" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] forState:UIControlStateNormal];
|
|
[self.rightButton setImage:[UIImage imageNamed:@"CPDFStampTextImageRight" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] forState:UIControlStateNormal];
|
|
[self.rightButton addTarget:self action:@selector(buttonItemClicked_select:) forControlEvents:UIControlEventTouchUpInside];
|
|
[self.rightButton addTarget:self action:@selector(buttonItemClicked_select:) forControlEvents:UIControlEventTouchUpInside];
|
|
self.rightButton.tag = 2;
|
|
self.rightButton.tag = 2;
|
|
|
|
+ self.rightButton.layer.cornerRadius = 5.0;
|
|
|
|
+ self.rightButton.layer.masksToBounds = YES;
|
|
[self.shapeView addSubview:self.rightButton];
|
|
[self.shapeView addSubview:self.rightButton];
|
|
[self.buttonArray addObject:self.rightButton];
|
|
[self.buttonArray addObject:self.rightButton];
|
|
|
|
|
|
@@ -77,6 +83,8 @@
|
|
[self.noneButton setImage:[UIImage imageNamed:@"CPDFStampTextImageNone" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] forState:UIControlStateNormal];
|
|
[self.noneButton setImage:[UIImage imageNamed:@"CPDFStampTextImageNone" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] forState:UIControlStateNormal];
|
|
[self.noneButton addTarget:self action:@selector(buttonItemClicked_select:) forControlEvents:UIControlEventTouchUpInside];
|
|
[self.noneButton addTarget:self action:@selector(buttonItemClicked_select:) forControlEvents:UIControlEventTouchUpInside];
|
|
self.noneButton.tag = 3;
|
|
self.noneButton.tag = 3;
|
|
|
|
+ self.noneButton.layer.cornerRadius = 5.0;
|
|
|
|
+ self.noneButton.layer.masksToBounds = YES;
|
|
[self.shapeView addSubview:self.noneButton];
|
|
[self.shapeView addSubview:self.noneButton];
|
|
[self.buttonArray addObject:self.noneButton];
|
|
[self.buttonArray addObject:self.noneButton];
|
|
}
|
|
}
|
|
@@ -87,10 +95,10 @@
|
|
[super layoutSubviews];
|
|
[super layoutSubviews];
|
|
self.titleLabel.frame = CGRectMake(20, 0, 50, self.bounds.size.height/3);
|
|
self.titleLabel.frame = CGRectMake(20, 0, 50, self.bounds.size.height/3);
|
|
self.shapeView.frame = CGRectMake(0, self.bounds.size.height/3, self.bounds.size.width, (self.bounds.size.height/3)*2);
|
|
self.shapeView.frame = CGRectMake(0, self.bounds.size.height/3, self.bounds.size.width, (self.bounds.size.height/3)*2);
|
|
- self.centerButton.frame = CGRectMake((self.shapeView.bounds.size.width - (self.shapeView.bounds.size.height*4))/5, 0, self.shapeView.bounds.size.height, self.shapeView.bounds.size.height-10);
|
|
|
|
- self.leftButton.frame = CGRectMake(((self.shapeView.bounds.size.width - (self.shapeView.bounds.size.height*4))/5)*2 + self.shapeView.bounds.size.height, 0, self.shapeView.bounds.size.height, self.shapeView.bounds.size.height);
|
|
|
|
- self.rightButton.frame = CGRectMake(((self.shapeView.bounds.size.width - (self.shapeView.bounds.size.height*4))/5)*3 + self.shapeView.bounds.size.height*2, 0, self.shapeView.bounds.size.height, self.shapeView.bounds.size.height);
|
|
|
|
- self.noneButton.frame = CGRectMake(((self.shapeView.bounds.size.width - (self.shapeView.bounds.size.height*4))/5)*4 + self.shapeView.bounds.size.height*3, 0, self.shapeView.bounds.size.height, self.shapeView.bounds.size.height);
|
|
|
|
|
|
+ self.centerButton.frame = CGRectMake((self.shapeView.bounds.size.width - (44*4))/5, (self.shapeView.bounds.size.height-44)/2, 44, 44);
|
|
|
|
+ self.leftButton.frame = CGRectMake(((self.shapeView.bounds.size.width - (44*4))/5)*2 + 44, (self.shapeView.bounds.size.height-44)/2, 44, 44);
|
|
|
|
+ self.rightButton.frame = CGRectMake(((self.shapeView.bounds.size.width - (44*4))/5)*3 + 44*2, (self.shapeView.bounds.size.height-44)/2, 44, 44);
|
|
|
|
+ self.noneButton.frame = CGRectMake(((self.shapeView.bounds.size.width - (44*4))/5)*4 + 44*3, (self.shapeView.bounds.size.height-44)/2, 44, 44);
|
|
}
|
|
}
|
|
|
|
|
|
#pragma mark - Action
|
|
#pragma mark - Action
|