Commit d305adff authored by Felix Paul Kühne's avatar Felix Paul Kühne

menu: disable gradients in dividers on iOS 7+

parent 0dc630eb
......@@ -235,6 +235,7 @@
UIView *headerView = nil;
if (headerText != [NSNull null]) {
headerView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, [UIScreen mainScreen].bounds.size.height, 21.0f)];
if (!SYSTEM_RUNS_IOS7_OR_LATER) {
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = headerView.bounds;
gradient.colors = @[
......@@ -242,6 +243,7 @@
(id)[UIColor colorWithRed:(56.0f/255.0f) green:(56.0f/255.0f) blue:(56.0f/255.0f) alpha:1.0f].CGColor,
];
[headerView.layer insertSublayer:gradient atIndex:0];
}
UILabel *textLabel = [[UILabel alloc] initWithFrame:CGRectInset(headerView.bounds, 12.0f, 5.0f)];
textLabel.text = (NSString *) headerText;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment