向iPhone模拟器中平添视频
向iPhone模拟器中添加视频
NSString *path=[[NSBundle mainBundle] pathForResource:@"视频名称" ofType:@"mp4"]; if(UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(path)){ UISaveVideoAtPathToSavedPhotosAlbum(path,nil,nil,nil); }else { //NSLog(@"no available"); UIAlertView *alert=[[UIAlertView alloc] initWithTitle:nil message:@"no available"delegate:self cancelButtonTitle:nil otherButtonTitles:nil]; [alert show]; [alert release]; }