// // CStampButton.m // ComPDFKit_Tools // // Copyright © 2014-2024 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 "CStampButton.h" @implementation CStampButton - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { self.stampBtn = [[UIButton alloc] init]; self.stampBtn.layer.cornerRadius = 20; self.stampBtn.layer.masksToBounds = YES; [self addSubview:self.stampBtn]; self.titleLabel = [[UILabel alloc] init]; self.titleLabel.textColor = [UIColor whiteColor]; self.titleLabel.backgroundColor = [UIColor clearColor]; [self addSubview:self.titleLabel]; self.backgroundColor = [UIColor clearColor]; } return self; } - (void)layoutSubviews { [super layoutSubviews]; self.stampBtn.frame = CGRectMake(self.bounds.size.width - 40, 0, 40, self.bounds.size.height); self.titleLabel.frame = CGRectMake(0, 0, 120, self.bounds.size.height); } @end