From 66099c5b41c0048d1cca0aed4835aa90700ccf5b Mon Sep 17 00:00:00 2001 From: Matthias Tretter Date: Wed, 27 Apr 2011 17:04:50 +0800 Subject: [PATCH] Fixed compile-error - missing variable definition --- Classes/AQGridViewCell.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/AQGridViewCell.m b/Classes/AQGridViewCell.m index d075e6d..33688c7 100644 --- a/Classes/AQGridViewCell.m +++ b/Classes/AQGridViewCell.m @@ -304,6 +304,8 @@ - (void) _beginBackgroundHighlight: (BOOL) highlightOn animated: (BOOL) animated #ifdef BUILTIN_IMAGES unsigned char * pngBytes = AQGridSelection_png; NSUInteger pngLength = AQGridSelection_png_len; + NSString *imageName = nil; + switch ( _cellFlags.selectionStyle ) { case AQGridViewCellSelectionStyleBlue: @@ -330,7 +332,7 @@ - (void) _beginBackgroundHighlight: (BOOL) highlightOn animated: (BOOL) animated NSData *pngData = [NSData dataWithBytesNoCopy: pngBytes length: pngLength freeWhenDone: NO]; _selectedBackgroundView = [[UIImageView alloc] initWithImage: [UIImage imageWithData: pngData]]; #else - NSString * imageName = @"AQGridSelection.png"; + imageName = @"AQGridSelection.png"; switch ( _cellFlags.selectionStyle ) { case AQGridViewCellSelectionStyleBlue: