Skip to content

Commit 071dfe0

Browse files
committed
Add innerStrokeColor property
1 parent 2ba60fc commit 071dfe0

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

WYPopoverController/WYPopoverController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ typedef NS_OPTIONS(NSUInteger, WYPopoverArrowDirection) {
7474
@property (nonatomic, assign) CGFloat minOuterCornerRadius UI_APPEARANCE_SELECTOR;
7575

7676
@property (nonatomic, strong) UIColor *innerShadowColor UI_APPEARANCE_SELECTOR;
77+
@property (nonatomic, strong) UIColor *innerStrokeColor UI_APPEARANCE_SELECTOR;
7778
@property (nonatomic, assign) CGFloat innerShadowBlurRadius UI_APPEARANCE_SELECTOR;
7879
@property (nonatomic, assign) CGSize innerShadowOffset UI_APPEARANCE_SELECTOR;
7980
@property (nonatomic, assign) CGFloat innerCornerRadius UI_APPEARANCE_SELECTOR;

WYPopoverController/WYPopoverController.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ @interface WYPopoverInnerView : UIView
264264
@property (nonatomic, assign) CGFloat gradientTopPosition;
265265

266266
@property (nonatomic, strong) UIColor *innerShadowColor;
267+
@property (nonatomic, strong) UIColor *innerStrokeColor;
267268
@property (nonatomic, assign) CGSize innerShadowOffset;
268269
@property (nonatomic, assign) CGFloat innerShadowBlurRadius;
269270
@property (nonatomic, assign) CGFloat innerCornerRadius;
@@ -288,6 +289,7 @@ @implementation WYPopoverInnerView
288289
@synthesize gradientTopPosition;
289290

290291
@synthesize innerShadowColor;
292+
@synthesize innerStrokeColor;
291293
@synthesize innerShadowOffset;
292294
@synthesize innerShadowBlurRadius;
293295
@synthesize innerCornerRadius;
@@ -354,7 +356,7 @@ - (void)drawRect:(CGRect)rect
354356

355357
UIBezierPath* inRoundedRectPath = [UIBezierPath bezierPathWithRoundedRect:CGRectInset(innerRect, 0.5, 0.5) cornerRadius:cornerRadius];
356358

357-
[self.strokeColor setStroke];
359+
[self.innerStrokeColor setStroke];
358360
inRoundedRectPath.lineWidth = 1;
359361
[inRoundedRectPath stroke];
360362
}
@@ -369,6 +371,7 @@ - (void)dealloc
369371
{
370372
strokeColor = nil;
371373
innerShadowColor = nil;
374+
innerStrokeColor = nil;
372375
gradientTopColor = nil;
373376
gradientBottomColor = nil;
374377
}
@@ -515,6 +518,7 @@ @implementation WYPopoverBackgroundView
515518
@synthesize outerCornerRadius;
516519
@synthesize minOuterCornerRadius;
517520
@synthesize innerShadowColor;
521+
@synthesize innerStrokeColor;
518522
@synthesize innerShadowBlurRadius;
519523
@synthesize innerShadowOffset;
520524
@synthesize innerCornerRadius;
@@ -547,6 +551,7 @@ + (void)load
547551
appearance.outerCornerRadius = 8;
548552
appearance.minOuterCornerRadius = 0;
549553
appearance.innerShadowColor = [UIColor colorWithWhite:0 alpha:0.75];
554+
appearance.innerStrokeColor = appearance.strokeColor;
550555
appearance.innerShadowBlurRadius = 2;
551556
appearance.innerShadowOffset = CGSizeMake(0, 1);
552557
appearance.innerCornerRadius = 6;
@@ -668,6 +673,7 @@ - (void)setViewController:(UIViewController *)viewController
668673
innerView.gradientBottomColor = self.fillBottomColor;
669674
innerView.strokeColor = self.strokeColor;
670675
innerView.innerShadowColor = innerShadowColor;
676+
innerView.innerStrokeColor = innerStrokeColor;
671677
innerView.innerShadowOffset = innerShadowOffset;
672678
innerView.innerCornerRadius = self.innerCornerRadius;
673679
innerView.innerShadowBlurRadius = innerShadowBlurRadius;
@@ -1140,6 +1146,7 @@ - (void)dealloc
11401146
glossShadowColor = nil;
11411147
outerShadowColor = nil;
11421148
innerShadowColor = nil;
1149+
innerStrokeColor = nil;
11431150
}
11441151

11451152
@end
@@ -1307,6 +1314,7 @@ - (void)presentPopoverFromRect:(CGRect)aRect inView:(UIView *)aView permittedArr
13071314
containerView.outerCornerRadius = appearance.outerCornerRadius;
13081315
containerView.minOuterCornerRadius = appearance.minOuterCornerRadius;
13091316
containerView.innerShadowColor = appearance.innerShadowColor;
1317+
containerView.innerStrokeColor = appearance.innerStrokeColor;
13101318
containerView.innerShadowBlurRadius = appearance.innerShadowBlurRadius;
13111319
containerView.innerShadowOffset = appearance.innerShadowOffset;
13121320
containerView.innerCornerRadius = appearance.innerCornerRadius;

0 commit comments

Comments
 (0)