安装pod
在Podfile文件中新增
pod 'TZImagePickerController'
添加好之后 pod install安装
TZImagePickerController使用
引入头文件
#import
@interface HandleMsgPictureView ()
@end
唤起相册
- (void)pushTZImagePickerController {
//能选择的最大图片数
NSInteger maxCount =服务器托管网 4 - self.photos.count;
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:maxCount columnNumber:4 delegate:self pushPhotoPickerVc:YES];
imagePickerVc.isSelectOriginalPhoto = NO;
[imagePickerVc setUiImagePickerControllerSettingBlock:^(UIImagePickerController *imageP服务器托管网ickerController) {
imagePickerController.videoQuality = UIImagePickerControllerQualityTypeHigh;
}];
// 修改 字体颜色为黑色
[imagePickerVc.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
imagePickerVc.navigationBar.barTintColor = kWhiteColor;
imagePickerVc.barItemTextColor = kBlackColor;
imagePickerVc.allowPickingVideo = NO;
imagePickerVc.allowPickingImage = YES;
imagePickerVc.allowPickingOriginalPhoto = NO;
imagePickerVc.allowPickingGif = NO;
imagePickerVc.allowPickingMultipleVideo = NO;// 是否可以多选视频
// 设置是否显示图片序号
imagePickerVc.showSelectedIndex = YES;
// 照片排列按修改时间升序
imagePickerVc.sortAscendingByModificationDate = YES;
imagePickerVc.modalPresentationStyle = UIModalPresentationFullScreen;
if (@available(iOS 13.0, *)) {
imagePickerVc.statusBarStyle = UIStatusBarStyleDarkContent;
} else {
imagePickerVc.statusBarStyle = UIStatusBarStyleDefault;
}
WeakSelf
// 你可以通过block或者代理,来得到用户选择的照片.
[imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
//自定义的数据处理
[weakSelf.photos addObjectsFromArray:photos];
[self loadData];
}];
[self.currentViewController presentViewController:imagePickerVc animated:YES completion:nil];
}
/// 用户点击了取消
- (void)tz_imagePickerControllerDidCancel:(TZImagePickerController *)picker {
NSLog(@"cancel");
}
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
1.简述Git Git是一种分布式版本控制系统,它允许多个开发者在任何时间,从任何地点对代码进行编辑和分享,而不会互相干扰。Git通过跟踪和管理代码的历史版本,帮助团队协作开发复杂的项目。 与集中式版本控制系统不同,Git的分布式特性意味着每个开发者的工作站都…