123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // 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
|