Skip to content

Instantly share code, notes, and snippets.

@PrideChung
Last active December 19, 2015 03:29
Show Gist options
  • Select an option

  • Save PrideChung/5890314 to your computer and use it in GitHub Desktop.

Select an option

Save PrideChung/5890314 to your computer and use it in GitHub Desktop.

Revisions

  1. PrideChung revised this gist Jun 29, 2013. 2 changed files with 6 additions and 6 deletions.
    6 changes: 6 additions & 0 deletions CAGradientLayerBoilerplate.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    CAGradientLayer *gradient = [CAGradientLayer layer];
    gradient.frame = cell.backgroundView.frame;
    UIColor* lightColor = [[UIColor blackColor] colorWithAlphaComponent:0.0];
    UIColor* darkColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
    gradient.colors = @[(id)darkColor.CGColor, (id)lightColor.CGColor];
    gradient.locations = @[@0.0, @1.0];
    6 changes: 0 additions & 6 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +0,0 @@
    CAGradientLayer *gradient = [CAGradientLayer layer];
    gradient.frame = cell.backgroundView.frame;
    UIColor* lightColor = [[UIColor blackColor] colorWithAlphaComponent:0.0];
    UIColor* darkColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
    gradient.colors = @[(id)darkColor.CGColor, (id)lightColor.CGColor];
    gradient.locations = @[@0.0, @1.0];
  2. PrideChung created this gist Jun 29, 2013.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    CAGradientLayer *gradient = [CAGradientLayer layer];
    gradient.frame = cell.backgroundView.frame;
    UIColor* lightColor = [[UIColor blackColor] colorWithAlphaComponent:0.0];
    UIColor* darkColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
    gradient.colors = @[(id)darkColor.CGColor, (id)lightColor.CGColor];
    gradient.locations = @[@0.0, @1.0];