mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
37 lines
905 B
Objective-C
37 lines
905 B
Objective-C
//
|
|
// UIIconButton.m
|
|
// linphone
|
|
//
|
|
// Created by Gautier Pelloux-Prayer on 22/07/15.
|
|
//
|
|
//
|
|
|
|
#import "UIIconButton.h"
|
|
|
|
#import "Utils.h"
|
|
|
|
@implementation UIIconButton
|
|
|
|
- (id)fixBackgroundImageForState {
|
|
[self setBackgroundImage:[self backgroundImageForState:UIControlStateHighlighted]
|
|
forState:(UIControlStateHighlighted | UIControlStateSelected)];
|
|
[self setBackgroundImage:[self backgroundImageForState:UIControlStateDisabled]
|
|
forState:(UIControlStateDisabled | UIControlStateSelected)];
|
|
[LinphoneUtils buttonFixStates:self];
|
|
[self.titleLabel setAdjustsFontSizeToFitWidth:TRUE];
|
|
return self;
|
|
}
|
|
|
|
- (id)init {
|
|
return [[super init] fixBackgroundImageForState];
|
|
}
|
|
|
|
- (id)initWithCoder:(NSCoder *)aDecoder {
|
|
return [[super initWithCoder:aDecoder] fixBackgroundImageForState];
|
|
}
|
|
|
|
- (id)initWithFrame:(CGRect)frame {
|
|
return [[super initWithFrame:frame] fixBackgroundImageForState];
|
|
}
|
|
|
|
@end
|