From c0e28da86a7de212c6258dfdc34c8073d20acb71 Mon Sep 17 00:00:00 2001 From: Denys Telezhkin Date: Mon, 19 Jan 2015 18:25:36 +0200 Subject: [PATCH] add IBInspectable support for almost all properties --- Shapes.podspec | 2 +- Shapes/DTProgressView.h | 2 +- Shapes/DTShapeView.h | 19 ++++++++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Shapes.podspec b/Shapes.podspec index 805a478..dfd4bc0 100644 --- a/Shapes.podspec +++ b/Shapes.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Shapes" - s.version = "1.0.0" + s.version = "1.0.1" s.summary = "Framework for drawing and animating shaped views on iOS" s.homepage = "https://github.com/DenHeadless/Shapes" diff --git a/Shapes/DTProgressView.h b/Shapes/DTProgressView.h index a5001ee..026ea1d 100644 --- a/Shapes/DTProgressView.h +++ b/Shapes/DTProgressView.h @@ -35,7 +35,7 @@ /** `DTProgressView` progress. Value range from 0 to 1, 0 by default. */ -@property (nonatomic, assign, readonly) float progress; +@property (nonatomic, assign, readonly) IBInspectable float progress; /** Duration of an animated progress change. diff --git a/Shapes/DTShapeView.h b/Shapes/DTShapeView.h index 29b8333..1c9176e 100644 --- a/Shapes/DTShapeView.h +++ b/Shapes/DTShapeView.h @@ -45,32 +45,37 @@ /** Fill color, used by CAShapeLayer. UIColor is automatically converted to and from CAShapeLayer fillColor property. */ -@property (nonatomic, strong) UIColor * fillColor; +@property (nonatomic, strong) IBInspectable UIColor * fillColor; /** Stroke color, used by CAShapeLayer. UIColor is automatically converted to and from CAShapeLayer strokeColor property. */ -@property (nonatomic, strong) UIColor * strokeColor; +@property (nonatomic, strong) IBInspectable UIColor * strokeColor; /** Fill rule, used by CAShapeLayer. Automatically converts to CAFillRule constant values on CAShapeLayer. */ -@property (nonatomic, assign) BOOL usesEvenOddFillRule; +@property (nonatomic, assign) IBInspectable BOOL usesEvenOddFillRule; /** - These properties use CAShapeLayer strokeStart and strokeEnd properties directly. + Set CAShapeLayer strokeStart property. */ -@property (nonatomic, assign) CGFloat strokeStart, strokeEnd; +@property (nonatomic, assign) IBInspectable CGFloat strokeStart; + +/** + Set CAShapeLayer strokeEnd property. + */ +@property (nonatomic, assign) IBInspectable CGFloat strokeEnd; /** This property uses CAShapeLayer lineWidth property directly. */ -@property (nonatomic, assign) CGFloat lineWidth; +@property (nonatomic, assign) IBInspectable CGFloat lineWidth; /** This property uses CAShapeLayer miterLimit property directly. */ -@property (nonatomic, assign) CGFloat miterLimit; +@property (nonatomic, assign) IBInspectable CGFloat miterLimit; /** This property is automatically converted to QuartzCore line cap constant values on CAShapeLayer.