Skip to content

Instantly share code, notes, and snippets.

@rodericj
Created December 10, 2014 17:00
Show Gist options
  • Save rodericj/1e924ac4b380c188b06d to your computer and use it in GitHub Desktop.
Save rodericj/1e924ac4b380c188b06d to your computer and use it in GitHub Desktop.
+ (FOMarker *)markerWithIconURL:(NSString *)iconURL color:(UIColor *)color {
UIImageView *pinImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
UIImage *pinImage = [UIImage imageNamed:@"mapPin"];// [self ipMaskedImageNamed:@"mapPin" color:color];
pinImageView.image = pinImage;
UIImageView *iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
iconImageView.image = [UIImage imageNamed:@"poweredByFoursquare_36x36"];
// Taken out to simplify and troubleshoot
// [iconImageView setImageWithURL:[NSURL URLWithString:iconURL]];
[pinImageView addSubview:iconImageView];
FOMarker *marker = [[self alloc] initWithImageView:pinImageView iconImageView:iconImageView];
return marker;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment