Skip to content

Instantly share code, notes, and snippets.

@thekarladam
Created September 6, 2011 17:54
Show Gist options
  • Save thekarladam/1198427 to your computer and use it in GitHub Desktop.
Save thekarladam/1198427 to your computer and use it in GitHub Desktop.
GradientView
@interface GradientView : UIView
@end
@implementation GradientView
+ (Class)layerClass {
return [CAGradientLayer class];
}
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
CAGradientLayer *layer = (CAGradientLayer *)self.layer;
layer.colors = [NSArray arrayWithObjects: (id)[[UIColor redColor] CGColor],
(id)[[UIColor greenColor] CGColor],
nil];
}
return self;
}
@end
@overbalance
Copy link

What spacing problem?

@thekarladam
Copy link
Author

Yea, I like real tabs, browser tabs are enormous though so they never line up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment