当我从照片库中选择视频/电影时,这是我的NSLog信息词典:
info dict = { UIImagePickerControllerMediaType = "public.movIE"; UIImagePickerControllerReferenceURL = "assets-library://asset/asset.MOV?ID=1000000466&ext=MOV";}解决方法
- (voID)imagePickerController:(UIImagePickerController *)picker dIDFinishPickingMediawithInfo:(NSDictionary *)info{ NSMutableDictionary *infoDict = [[NSMutableDictionary alloc]init]; Nsstring *mediaType = [info objectForKey:UIImagePickerControllerMediaType]; if ([mediaType isEqualToString:@"public.image"]){ UIAlertVIEw *myAlertVIEw = [[UIAlertVIEw alloc] initWithTitle:@"" message:@"You Select a image Please select MovIE" delegate:self cancelbuttonTitle:@"OK" otherbuttonTitles:nil]; [myAlertVIEw show]; [myAlertVIEw release]; } else if ([mediaType isEqualToString:@"public.movIE"]){ NSURL *vIDeoURL = [info objectForKey:UIImagePickerControllerMediaURL]; mAppDelegate.uploadType = @"VIDeo"; NSData *webData = [NSData dataWithContentsOfURL:vIDeoURL]; [infoDict setValue:webData forKey:@"VIDeoUrl"]; [infoDict setValue:[[mAppDelegate.userInfoArray objectAtIndex:1]valueForKey:@"user_ID"] forKey:@"user_ID"]; [[WakeUpParsing sharedInstance] assignSender:self]; [[WakeUpParsing sharedInstance] startParsingForVedioUploade:infoDict]; } [picker dismissModalVIEwControllerAnimated:YES]; [infoDict release];}- (voID)imagePickerControllerDIDCancel:(UIImagePickerController *)picker{ // dismiss the image selection and close the program [[picker parentVIEwController] dismissModalVIEwControllerAnimated:YES];}总结
以上是内存溢出为你收集整理的ios – “imagePickerController:didFinishPickingMediaWithInfo:”“UIImagePickerControllerMediaURL”信息字典中的关键奇怪行为全部内容,希望文章能够帮你解决ios – “imagePickerController:didFinishPickingMediaWithInfo:”“UIImagePickerControllerMediaURL”信息字典中的关键奇怪行为所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)