开发者

current location with map

hai I am creating an application. I want to sent the users 开发者_开发技巧current location with map using gps and without gps as sms. Is it possible? Please help me if anybody knows. Give some sample tutorial or code. Thank you


you can take screen shot of mapview through the following code and send multimedia SMS through the link

 - (UIImage *)captureView:(UIView *)view 
{
    CGRect screenRect = [[UIScreen mainScreen] bounds];

   UIGraphicsBeginImageContext(screenRect.size);

  CGContextRef ctx = UIGraphicsGetCurrentContext();
  [[UIColor blackColor] set];
  CGContextFillRect(ctx, screenRect);

  [view.layer renderInContext:ctx];

   UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();

  UIGraphicsEndImageContext();

  return newImage;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜