-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathTWAdBlockSettingsTextFieldTableViewCell.x
More file actions
29 lines (27 loc) · 1.1 KB
/
TWAdBlockSettingsTextFieldTableViewCell.x
File metadata and controls
29 lines (27 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#import "TWAdBlockSettingsTextFieldTableViewCell.h"
%subclass TWAdBlockSettingsTextFieldTableViewCell : BaseTableViewCell
%property(nonatomic, strong) TWAdBlockSettingsTextField *textField;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = %orig)) {
self.textField = [[objc_getClass("TWAdBlockSettingsTextField") alloc]
initWithFrame:self.frame
themeManager:[objc_getClass("_TtC12TwitchCoreUI21TWDefaultThemeManager")
defaultThemeManager]];
UITextField *textField = object_getIvar(
self.textField, class_getInstanceVariable(object_getClass(self.textField), "textField"));
textField.returnKeyType = UIReturnKeyDone;
[self addSubview:self.textField];
}
return self;
}
- (void)layoutSubviews {
%orig;
self.textField.frame = self.bounds;
self.textField.layer.cornerRadius = self.layer.cornerRadius;
}
%end
%ctor {
%init(BaseTableViewCell =
objc_getClass("TWBaseTableViewCell")
?: objc_getClass("_TtC12TwitchCoreUI17BaseTableViewCell"));
}