mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
914 B
Objective-C
41 lines
914 B
Objective-C
#import "DialerButtonView.h"
|
|
#import "UIUtil.h"
|
|
|
|
@implementation DialerButtonView
|
|
|
|
- (void)awakeFromNib {
|
|
[super awakeFromNib];
|
|
_numberLabel.text = NSLocalizedString(_numberLocalizationKey, @"");
|
|
_letterLabel.text = NSLocalizedString(_letterLocalizationKey, @"");
|
|
self.layer.cornerRadius = 4.0f;
|
|
self.layer.borderColor = [[UIUtil darkBackgroundColor] CGColor];
|
|
}
|
|
|
|
- (void)setSelected:(BOOL)isSelected {
|
|
|
|
if (isSelected) {
|
|
self.backgroundColor = [UIUtil transparentLightGrayColor];
|
|
self.layer.borderWidth = 0.5f;
|
|
} else {
|
|
self.backgroundColor = [UIColor clearColor];
|
|
self.layer.borderWidth = 0.0f;
|
|
}
|
|
}
|
|
|
|
#pragma mark - Actions
|
|
|
|
- (void)buttonTouchUp {
|
|
[self setSelected:NO];
|
|
[_delegate dialerButtonViewDidSelect:self];
|
|
}
|
|
|
|
- (void)buttonTouchCancel {
|
|
[self setSelected:NO];
|
|
}
|
|
|
|
- (void)buttonTouchDown {
|
|
[self setSelected:YES];
|
|
}
|
|
|
|
@end
|