mirror of
https://github.com/faroukbmiled/RyukGram.git
synced 2026-04-22 20:26:15 +02:00
43 lines
1.0 KiB
Objective-C
43 lines
1.0 KiB
Objective-C
//
|
|
// JGProgressHUDImageIndicatorView.m
|
|
// JGProgressHUD
|
|
//
|
|
// Created by Jonas Gessner on 05.08.15.
|
|
// Copyright (c) 2015 Jonas Gessner. All rights reserved.
|
|
//
|
|
|
|
#import "JGProgressHUDImageIndicatorView.h"
|
|
|
|
@implementation JGProgressHUDImageIndicatorView {
|
|
BOOL _customizedTintColor;
|
|
}
|
|
|
|
- (instancetype)initWithImage:(UIImage *)image {
|
|
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
|
|
|
|
self = [super initWithContentView:imageView];
|
|
|
|
return self;
|
|
}
|
|
|
|
- (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled {
|
|
[super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled];
|
|
|
|
if (!_customizedTintColor) {
|
|
if (style == JGProgressHUDStyleDark) {
|
|
self.tintColor = [UIColor whiteColor];
|
|
}
|
|
else {
|
|
self.tintColor = [UIColor blackColor];
|
|
}
|
|
_customizedTintColor = NO;
|
|
}
|
|
}
|
|
|
|
- (void)setTintColor:(UIColor *)tintColor {
|
|
[super setTintColor:tintColor];
|
|
_customizedTintColor = YES;
|
|
}
|
|
|
|
@end
|