Skip to content

Commit 4397973

Browse files
author
Eric Rolf
committed
Updated Obj-C version to handle prepareForInterfaceBuilder default values.
1 parent 6744817 commit 4397973

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ProgressView/CircleProgressView.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ - (instancetype)initWithFrame:(CGRect)frame {
4949
return self;
5050
}
5151

52+
#pragma mark - Interface Builder
53+
54+
- (void)prepareForInterfaceBuilder {
55+
self.trackBackgroundColor = (self.trackBackgroundColor)? :[UIColor darkGrayColor];
56+
self.trackFillColor = (self.trackFillColor)? :[UIColor purpleColor];
57+
self.trackWidth = (self.trackWidth)? :10;
58+
self.clockwise = (self.clockwise)? :true;
59+
self.progress = (self.progress)? :.45;
60+
self.centerFillColor = (self.centerFillColor)? : [UIColor whiteColor];
61+
}
62+
5263
#pragma mark - Setup
5364

5465
- (void)setup {

0 commit comments

Comments
 (0)