added other initiliazers

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-01-18 14:47:13 -06:00
parent c03e04069a
commit d5a9710b6c

View File

@ -17,17 +17,37 @@
@implementation MFLoadingSpinner
- (instancetype)init {
self = [super init];
if (self) {
[self setup];
}
return self;
}
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.loader = [[VDSLoader alloc] init];
[self addSubview: self.loader];
[NSLayoutConstraint pinViewToSuperview:self.loader useMargins:false];
[self setup];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)coder {
self = [super initWithCoder: coder];
if (self) {
[self setup];
}
return self;
}
-(void) setup {
self.loader = [[VDSLoader alloc] init];
[self addSubview: self.loader];
[NSLayoutConstraint pinViewToSuperview:self.loader useMargins:false];
}
-(void)setUpCircle {
[self setUpCircle:[UIColor blackColor]];
}