Correcting use of self in CPShadowView shadowViewEnclosingView:

This commit is contained in:
aradabaugh committed 2012-01-20 13:33:24 -07:00
1 parent a8d8736899
commit 6bc3d49ba2
1 file changed
+12 -12
+12 -12
View File
@@ -98,26 +98,26 @@ var LIGHT_LEFT_INSET = 3.0,
+ (id)shadowViewEnclosingView:(CPView)aView withWeight:(CPShadowWeight)aWeight
{
var self = [[CPShadowView alloc] initWithFrame:[aView frame]];
var shadowView = [[self alloc] initWithFrame:[aView frame]];
if (self)
if (shadowView)
{
[self setWeight:aWeight];
[shadowView setWeight:aWeight];
var size = [self frame].size,
width = size.width - [self leftInset] - [self rightInset],
height = size.height - [self topInset] - [self bottomInset],
var size = [shadowView frame].size,
width = size.width - [shadowView leftInset] - [shadowView rightInset],
height = size.height - [shadowView topInset] - [shadowView bottomInset],
enclosingView = [aView superview];
[self setHitTests:[aView hitTests]];
[self setAutoresizingMask:[aView autoresizingMask]];
[shadowView setHitTests:[aView hitTests]];
[shadowView setAutoresizingMask:[aView autoresizingMask]];
[aView removeFromSuperview];
[self addSubview:aView];
[aView setFrame:CGRectMake([self leftInset], [self topInset], width, height)]
[enclosingView addSubview:self];
[shadowView addSubview:aView];
[aView setFrame:CGRectMake([shadowView leftInset], [shadowView topInset], width, height)]
[enclosingView addSubview:shadowView];
}
return self;
return shadowView;
}
- (id)initWithFrame:(CGRect)aFrame