Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to hide the drop shadow that appears during search #22

Merged
merged 2 commits into from
Jul 3, 2014

Conversation

sgtsquiggs
Copy link
Contributor

This has some synergy with the existing pull request to hide the bottom border.

@davbeck
Copy link
Owner

davbeck commented Jul 3, 2014

Shouldn't this:

- (void)updateShadows
{
    if (_searching) {
        if (_showsShadows) {
            self.layer.shadowColor = [UIColor blackColor].CGColor;
            self.layer.shadowOffset = CGSizeMake(0.0, 0.0);
            self.layer.shadowOpacity = 0.5;
            self.layer.shadowRadius = 5.0;
            self.clipsToBounds = NO;
        }
    } else {
        if (_showsShadows) {
            self.layer.shadowOpacity = 0.0;
            self.layer.shadowRadius = 0.0;
            self.clipsToBounds = YES;
        }
    }
}

Be this?

- (void)updateShadows
{
    if (_searching && _showsShadows) {
        self.layer.shadowColor = [UIColor blackColor].CGColor;
        self.layer.shadowOffset = CGSizeMake(0.0, 0.0);
        self.layer.shadowOpacity = 0.5;
        self.layer.shadowRadius = 5.0;
        self.clipsToBounds = NO;
    } else {
        self.layer.shadowOpacity = 0.0;
        self.layer.shadowRadius = 0.0;
        self.clipsToBounds = YES;
    }
}

@sgtsquiggs
Copy link
Contributor Author

Both work, the original just doesn't modify the layer/clipping at all if shadows are disabled. The revision is definitely cleaner.

davbeck added a commit that referenced this pull request Jul 3, 2014
Added ability to hide the drop shadow that appears during search
@davbeck davbeck merged commit 994e9d2 into davbeck:master Jul 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants