开发者

current location with map

开发者 https://www.devze.com 2023-02-28 17:35 出处:网络
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?

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

精彩评论

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