Skip to content

Commit

Permalink
Merge pull request escoz#485 from SSheldon/master
Browse files Browse the repository at this point in the history
Fix QColorPickerElement getImageFromItem: method
  • Loading branch information
escoz committed Apr 29, 2013
2 parents dfbd70c + 0a0abfe commit b610b14
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions quickdialog/QColorPickerElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ - (QColorPickerElement *)init {
self.items = @[
@[@"Black", [UIColor blackColor]],
@[@"White", [UIColor whiteColor]],
@[@"Blue", [UIColor grayColor]],
@[@"Red", [UIColor blueColor]],
@[@"Gray", [UIColor grayColor]],
@[@"Blue", [UIColor blueColor]],
@[@"Red", [UIColor redColor]],
@[@"Green", [UIColor greenColor]],
@[@"Yellow", [UIColor yellowColor]],
@[@"Purple", [UIColor purpleColor]],
Expand All @@ -44,7 +45,7 @@ - (void)updateCell:(QEntryTableViewCell *)cell selectedValue:(id)selectedValue {
}

- (UIImage *)getImageFromItem:(NSArray *)selectedValue {
id color = [[selectedValue objectAtIndex:1] description];
id color = [selectedValue objectAtIndex:1];
if ([color isKindOfClass:[UIColor class]])
return [color imageByDrawingCircleOfColor];
if ([color isKindOfClass:[NSString class]])
Expand Down

0 comments on commit b610b14

Please sign in to comment.