向iPhone模拟器中添加视频

NSString *path=[[NSBundle mainBundlepathForResource:@"视频名称" ofType:@"mp4"];

if(UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(path)){

UISaveVideoAtPathToSavedPhotosAlbum(path,nil,nil,nil);

}else {

//NSLog(@"no available");

UIAlertView *alert=[[UIAlertView allocinitWithTitle:nil message:@"no available"delegate:self cancelButtonTitle:nil otherButtonTitles:nil];

[alert show];

[alert release];

}

你可能感兴趣的:(向iPhone模拟器中添加视频)