Skip to content

Commit

Permalink
add IBInspectable support for almost all properties
Browse files Browse the repository at this point in the history
  • Loading branch information
DenTelezhkin committed Jan 19, 2015
1 parent a223201 commit c0e28da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Shapes.podspec
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Shapes/DTProgressView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
19 changes: 12 additions & 7 deletions Shapes/DTShapeView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c0e28da

Please sign in to comment.