forked from overtake/telegram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTGSNoAuthModalView.m
41 lines (31 loc) · 1.09 KB
/
TGSNoAuthModalView.m
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
30
31
32
33
34
35
36
37
38
39
40
41
//
// TGSNoAuthModalView.m
// Telegram
//
// Created by keepcoder on 19.05.15.
// Copyright (c) 2015 keepcoder. All rights reserved.
//
#import "TGSNoAuthModalView.h"
@implementation TGSNoAuthModalView
- (void)drawRect:(NSRect)dirtyRect {
[super drawRect:dirtyRect];
// Drawing code here.
}
-(instancetype)initWithFrame:(NSRect)frameRect {
if(self = [super initWithFrame:frameRect]) {
self.backgroundColor = [NSColor whiteColor];
NSTextField *textField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, NSWidth(frameRect), 40)];
[textField setStringValue:NSLocalizedString(@"NoAuthDescription", nil)];
[textField setFont:TGSystemFont(14)];
[textField setBackgroundColor:GRAY_TEXT_COLOR];
[textField setDrawsBackground:NO];
[textField setAlignment:NSCenterTextAlignment];
[textField setDrawsBackground:NO];
[textField setSelectable:NO];
[textField setBordered:NO];
[textField setCenterByView:self];
[self addSubview:textField];
}
return self;
}
@end