+ (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType
指定的源类型是否可用,sourceType是枚举类型:
UIImagePickerControllerSourceTypePhotoLibrary:照片库
UIImagePickerControllerSourceTypeCamera:摄像头
UIImagePickerControllerSourceTypeSavedPhotosAlbum:相簿
+ (NSArray )availableMediaTypesForSourceType:(UIImagePickerControllerSourceType)sourceType
指定的源设备上可用的媒体类型,一般就是和视频
+ (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType;
指定来源是否支持:
UIImagePickerControllerSourceTypePhotoLibrary:来自图库
UIImagePickerControllerSourceTypeCamera:来自相机
UIImagePickerControllerSourceTypeSavedPhotosAlbum:来自相册
+ (BOOL)isCameraDeviceAvailable:(UIImagePickerControllerCameraDevice)cameraDevice
指定的摄像头是否可用,cameraDevice是枚举类型:
UIImagePickerControllerCameraDeviceRear:前置摄像头
UIImagePickerControllerCameraDeviceFront:后置摄像头
+ (BOOL)isFlashAvailableForCameraDevice:(UIImagePickerControllerCameraDevice)cameraDevice
指定摄像头的闪光灯是否可用
+ (NSArray )availableCaptureModesForCameraDevice:(UIImagePickerControllerCameraDevice)cameraDevice
获得指定摄像头上的可用捕获模式,捕获模式是枚举类型:
UIImagePickerControllerCameraCaptureModePhoto:拍照模式
UIImagePickerControllerCameraCaptureModeVideo:视频录制模式
- (void)imagePickerController:(UIImagePickerController )picker didFinishPickingMediaWithInfo:(NSDictionary )info
代理 - 拍摄或录制完成 这里获取或视频信息
- (void)imagePickerControllerDidCancel:(UIImagePickerController )picker
代理 - 用户取消拍摄
UIImageWriteToSavedPhotosAlbum(UIImage image, id completionTarget, SEL completionSelector, void contextInfo)
保存到本地�相册
UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(NSString videoPath)
能否将视频保存到相簿 更安全的判断
void UISaveVideoAtPathToSavedPhotosAlbum(NSString videoPath, id completionTarget, SEL completionSelector, void contextInfo)
保存视频到本地�相册
感谢崔大大的博客:iOS开发系列--音频播放、录音、视频播放、拍照、视频录制
感谢张大大的博客:AVFoundation Programming Guide(官方文档翻译)完整版中英对照在使用element date-picker组件时发现周数获取问题,如下
如:当前如期为2021/10/08
date-picker显示周数为 202040
这个周数 202040 是ISOWEEK周数,而我们后端使用的是非ISOWEEK周数为 202041
如果此时你需要的刚好是 ISOWEEK 周数,可以直接使用,如果想拿到 非ISOWEEK 周数,该如何处理~,本以为element会提供,找了半天没找到,有知道的朋友可以下方留言告诉我,感谢!!!
下面是我获取非ISOWEEK周数的处理方式
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)