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;
}
精彩评论