2011-04-25 152 views
1

海 我正在创建一个应用程序。我想发送用户当前位置与地图使用GPS和没有GPS作为短信。可能吗? 如果有人知道,请帮助我。给一些示例教程或代码。 谢谢当前位置与地图

回答

1

你可以采取的MapView的屏幕快照通过下面的代码,并通过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; 
} 
发送多媒体短信