根据纬度和经度创建如下标记可帮助我通过动画将标记移动到另一个位置。
GMSMarker *marker1 = [[GMSMarker alloc] init];
marker1.position = CLLocationCoordinate2DMake(12.9716, 77.5946);
marker1.title = @"Bangalore";
marker1.groundAnchor = CGPointMake(0.2, 0.9);
marker1.appearAnimation = kGMSMarkerAnimationPop;
marker1.icon = [UIImage imageNamed:@"Flag Filled -50.png"];
marker1.snippet = @"India";
marker1.map = _mapView;
Run Code Online (Sandbox Code Playgroud) 在microsoft hololens中,将光标添加到按钮但无法添加光标操作,任何人都可以提前帮助.
我试着下载但下载的视频显示不支持plz帮助感谢您的帮助.
这是我的代码:
从网址代码下载视频
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSLog(@"Downloading Started");
NSString *urlToDownload = @"http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8";
NSURL *url = [NSURL URLWithString:urlToDownload];
NSData *urlData = [NSData dataWithContentsOfURL:url];
if ( urlData )
{
NSLog(@"urldata %@ ",urlData);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory,@"thefifle2.mov"];
//saving is done on main thread
dispatch_async(dispatch_get_main_queue(), ^{
[urlData writeToFile:filePath atomically:YES];
NSLog(@"File Saved !%@",filePath);
_url = [NSURL URLWithString:filePath];
[self playv];
});
}
});
Run Code Online (Sandbox Code Playgroud)
使用MPMoviepLayercontroller播放下载的视频
NSURL *vedioURL;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString …Run Code Online (Sandbox Code Playgroud)