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.
session-ios/SignalUtilitiesKit/Shared Views/OWSTextField.m

39 lines
686 B
Objective-C

//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSTextField.h"
#import <SessionUIKit/SessionUIKit.h>
NS_ASSUME_NONNULL_BEGIN
@implementation OWSTextField
- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
[self ows_applyTheme];
}
return self;
}
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder
{
if (self = [super initWithCoder:aDecoder]) {
[self ows_applyTheme];
}
return self;
}
- (void)ows_applyTheme
{
self.keyboardAppearance = LKAppModeUtilities.isLightMode ? UIKeyboardAppearanceDefault : UIKeyboardAppearanceDark;
}
@end
NS_ASSUME_NONNULL_END