-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCircleView.m
More file actions
executable file
·41 lines (34 loc) · 817 Bytes
/
CircleView.m
File metadata and controls
executable file
·41 lines (34 loc) · 817 Bytes
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
//
// CircleView.m
// IDLoc
//
// Created by Clement RUCHETON on 07/01/2014.
// Copyright (c) 2014 Clement RUCHETON. All rights reserved.
//
#import "CircleView.h"
@implementation CircleView
- (id)initWithFrame:(CGRect)frame
{
frame.size.height = frame.size.width;
self = [super initWithFrame:frame];
if (self) {
// Initialization code
self.layer.cornerRadius = self.frame.size.width;
}
return self;
}
- (void)setFrame:(CGRect)frame
{
frame.size.height = frame.size.width;
self.layer.cornerRadius = self.frame.size.width / 2;
[super setFrame:frame];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
// Drawing code
}
*/
@end