Last active
January 17, 2016 07:25
-
-
Save denispeyrusaubes/f4a2aa7eca6de8963119 to your computer and use it in GitHub Desktop.
SquareGUI background color
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIColor* darkSquare = [[UIColor alloc] initWithRed:202.0/255.0 green:134.0/255.0 blue:68.0/255.0 alpha:1.0]; | |
UIColor* lightSquare = [[UIColor alloc] initWithRed:255.0/255.0 green:206.0/255.0 blue:158.0/255.0 alpha:1.0]; | |
int y =(int) (self.offset/8) +1; | |
if ( (self.offset + y ) % 2 == 0) { | |
self.backgroundColor = lightSquare; | |
} else { | |
self.backgroundColor = darkSquare; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment