Skip to content

Instantly share code, notes, and snippets.

@braitom
Created March 20, 2014 07:39
Show Gist options
  • Save braitom/9659007 to your computer and use it in GitHub Desktop.
Save braitom/9659007 to your computer and use it in GitHub Desktop.
OutletコレクションのUIImageViewでとある言葉によって出す画像を変える
- (void)imageSelector:(NSArray *)statusList status:(NSString *)status index:(NSUInteger)index trueWord:(NSString *)word {
UIImageView *statusColor = statusList[index];
if ([status isEqualToString:word]) {
statusColor.image = [UIImage imageNamed:@"green_circle"];
} else {
statusColor.image = [UIImage imageNamed:@"red_circle"];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment