Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes issue #113 highlighting problem #114

Merged
merged 1 commit into from

2 participants

@MegaJiXiang

Fixes issue #113 highlighting problem

@jonsterling jonsterling merged commit 6cd8ed3 into kolinkrewinkel:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2012
  1. @MegaJiXiang
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 KKGridView/KKGridViewCell.m
View
5 KKGridView/KKGridViewCell.m
@@ -65,11 +65,12 @@ - (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier
_selectedBackgroundView = [[UIView alloc] initWithFrame:self.bounds];
_selectedBackgroundView.hidden = YES;
_selectedBackgroundView.alpha = 0.f;
- [self addSubview:_selectedBackgroundView];
+
_contentView = [[UIView alloc] initWithFrame:self.bounds];
_contentView.backgroundColor = [UIColor whiteColor];
[self addSubview:_contentView];
+ [self addSubview:_selectedBackgroundView];
[_contentView addObserver:self forKeyPath:@"backgroundColor" options:NSKeyValueObservingOptionNew context:NULL];
}
@@ -213,9 +214,9 @@ - (void)layoutSubviews
_backgroundView.frame = self.bounds;
_selectedBackgroundView.frame = self.bounds;
- [self sendSubviewToBack:_selectedBackgroundView];
[self sendSubviewToBack:_backgroundView];
[self bringSubviewToFront:_contentView];
+ [self bringSubviewToFront:_selectedBackgroundView];
if (_selected || _highlighted) {
Something went wrong with that request. Please try again.