I was building an application, an example I have MapView that will show many annView, the question is How can I make it all different, with a little subtitle, such as number or something like symbol
can UIImage do that?
I want to make something like Yelp
+ (UIImage *) imageWithView:(UIView *)view
{
UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0);
//UIGraphicsBeginImageContext(view.bounds.size);
开发者_JAVA百科 [view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}
If I'm understanding your question correctly it sounds like you could get what you want with a custom UIView that contained a UIImageView and a UILabel.
精彩评论