12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- //
- // TADotView.m
- // TAPageControl
- //
- // Created by Tanguy Aladenise on 2015-01-22.
- // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
- //
- #import "TADotView.h"
- @implementation TADotView
- - (instancetype)init
- {
- self = [super init];
- if (self) {
- [self initialization];
- }
-
- return self;
- }
- - (id)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- [self initialization];
- }
- return self;
- }
- - (id)initWithCoder:(NSCoder *)aDecoder
- {
- self = [super initWithCoder:aDecoder];
- if (self) {
- [self initialization];
- }
-
- return self;
- }
- - (void)initialization
- {
- self.backgroundColor = [UIColor clearColor];
- self.layer.cornerRadius = CGRectGetWidth(self.frame) / 2;
- self.layer.borderColor = [UIColor whiteColor].CGColor;
- self.layer.borderWidth = 2;
- }
- - (void)changeActivityState:(BOOL)active
- {
- if (active) {
- self.backgroundColor = [UIColor whiteColor];
- } else {
- self.backgroundColor = [UIColor clearColor];
- }
- }
- @end
|