开发者

can UIimage have text or string at xcode?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜