From d5a9710b6c1e5848e78bf464a30512b42608ae9d Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 18 Jan 2024 14:47:13 -0600 Subject: [PATCH] added other initiliazers Signed-off-by: Matt Bruce --- MVMCoreUI/Legacy/Views/MFLoadingSpinner.m | 26 ++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/MVMCoreUI/Legacy/Views/MFLoadingSpinner.m b/MVMCoreUI/Legacy/Views/MFLoadingSpinner.m index 07a254d6..4cb309c2 100644 --- a/MVMCoreUI/Legacy/Views/MFLoadingSpinner.m +++ b/MVMCoreUI/Legacy/Views/MFLoadingSpinner.m @@ -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]]; }