Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
caoer committed Apr 9, 2019
2 parents f11d7a0 + 2b944e4 commit d600800
Show file tree
Hide file tree
Showing 34 changed files with 362 additions and 243 deletions.
2 changes: 1 addition & 1 deletion QMUIKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "QMUIKit"
s.version = "3.1.3"
s.version = "3.1.4"
s.summary = "致力于提高项目 UI 开发效率的解决方案"
s.description = <<-DESC
QMUI iOS 是一个致力于提高项目 UI 开发效率的解决方案,其设计目的是用于辅助快速搭建一个具备基本设计还原效果的 iOS 项目,同时利用自身提供的丰富控件及兼容处理, 让开发者能专注于业务需求而无需耗费精力在基础代码的设计上。不管是新项目的创建,或是已有项目的维护,均可使开发效率和项目质量得到大幅度提升。
Expand Down
2 changes: 1 addition & 1 deletion QMUIKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.1.3</string>
<string>3.1.4</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#import "QMUITableViewCell.h"
#import "QMUIAssetsGroup.h"

NS_ASSUME_NONNULL_BEGIN

@class QMUIImagePickerViewController;
@class QMUIAlbumViewController;
Expand Down Expand Up @@ -57,10 +58,10 @@
@property(nonatomic, assign) CGFloat albumImageSize UI_APPEARANCE_SELECTOR; // 相册缩略图的大小
@property(nonatomic, assign) CGFloat albumImageMarginLeft UI_APPEARANCE_SELECTOR; // 相册缩略图的 left,-1 表示自动保持与上下 margin 相等
@property(nonatomic, assign) UIEdgeInsets albumNameInsets UI_APPEARANCE_SELECTOR; // 相册名称的上下左右间距
@property(nonatomic, strong) UIFont *albumNameFont UI_APPEARANCE_SELECTOR; // 相册名的字体
@property(nonatomic, strong) UIColor *albumNameColor UI_APPEARANCE_SELECTOR; // 相册名的颜色
@property(nonatomic, strong) UIFont *albumAssetsNumberFont UI_APPEARANCE_SELECTOR; // 相册资源数量的字体
@property(nonatomic, strong) UIColor *albumAssetsNumberColor UI_APPEARANCE_SELECTOR; // 相册资源数量的颜色
@property(nullable, nonatomic, strong) UIFont *albumNameFont UI_APPEARANCE_SELECTOR; // 相册名的字体
@property(nullable, nonatomic, strong) UIColor *albumNameColor UI_APPEARANCE_SELECTOR; // 相册名的颜色
@property(nullable, nonatomic, strong) UIFont *albumAssetsNumberFont UI_APPEARANCE_SELECTOR; // 相册资源数量的字体
@property(nullable, nonatomic, strong) UIColor *albumAssetsNumberColor UI_APPEARANCE_SELECTOR; // 相册资源数量的颜色

@end

Expand All @@ -74,16 +75,16 @@
*/
@interface QMUIAlbumViewController : QMUICommonTableViewController

@property(nonatomic, weak) id<QMUIAlbumViewControllerDelegate> albumViewControllerDelegate;
@property(nullable, nonatomic, weak) id<QMUIAlbumViewControllerDelegate> albumViewControllerDelegate;

/// 相册列表 cell 的高度,同时也是相册预览图的宽高,默认57
@property(nonatomic, assign) CGFloat albumTableViewCellHeight UI_APPEARANCE_SELECTOR;

/// 相册展示内容的类型,可以控制只展示照片、视频或音频的其中一种,也可以同时展示所有类型的资源,默认展示所有类型的资源。
@property(nonatomic, assign) QMUIAlbumContentType contentType;

@property(nonatomic, copy) NSString *tipTextWhenNoPhotosAuthorization;
@property(nonatomic, copy) NSString *tipTextWhenPhotosEmpty;
@property(nullable, nonatomic, copy) NSString *tipTextWhenNoPhotosAuthorization;
@property(nullable, nonatomic, copy) NSString *tipTextWhenPhotosEmpty;

/**
* 加载相册列表时会出现 loading,若需要自定义 loading 的形式,可将该属性置为 NO,默认为 YES。
Expand All @@ -99,6 +100,8 @@

@interface QMUIAlbumViewController (UIAppearance)

+ (nonnull instancetype)appearance;
+ (instancetype)appearance;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#import "QMUIImagePreviewViewController.h"
#import "QMUIAsset.h"

NS_ASSUME_NONNULL_BEGIN

@class QMUIButton, QMUINavigationButton;
@class QMUIImagePickerViewController;
@class QMUIImagePickerPreviewViewController;
Expand All @@ -41,18 +43,18 @@

@interface QMUIImagePickerPreviewViewController : QMUIImagePreviewViewController <QMUIImagePreviewViewDelegate>

@property(nonatomic, weak) id<QMUIImagePickerPreviewViewControllerDelegate> delegate;
@property(nullable, nonatomic, weak) id<QMUIImagePickerPreviewViewControllerDelegate> delegate;

@property(nonatomic, strong) UIColor *toolBarBackgroundColor UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) UIColor *toolBarTintColor UI_APPEARANCE_SELECTOR;
@property(nullable, nonatomic, strong) UIColor *toolBarBackgroundColor UI_APPEARANCE_SELECTOR;
@property(nullable, nonatomic, strong) UIColor *toolBarTintColor UI_APPEARANCE_SELECTOR;

@property(nonatomic, strong, readonly) UIView *topToolBarView;
@property(nonatomic, strong, readonly) QMUINavigationButton *backButton;
@property(nonatomic, strong, readonly) QMUIButton *checkboxButton;
@property(nullable, nonatomic, strong, readonly) UIView *topToolBarView;
@property(nullable, nonatomic, strong, readonly) QMUINavigationButton *backButton;
@property(nullable, nonatomic, strong, readonly) QMUIButton *checkboxButton;

/// 由于组件需要通过本地图片的 QMUIAsset 对象读取图片的详细信息,因此这里的需要传入的是包含一个或多个 QMUIAsset 对象的数组
@property(nonatomic, strong) NSMutableArray<QMUIAsset *> *imagesAssetArray;
@property(nonatomic, strong) NSMutableArray<QMUIAsset *> *selectedImageAssetArray;
@property(nullable, nonatomic, strong) NSMutableArray<QMUIAsset *> *imagesAssetArray;
@property(nullable, nonatomic, strong) NSMutableArray<QMUIAsset *> *selectedImageAssetArray;

@property(nonatomic, assign) QMUIAssetDownloadStatus downloadStatus;

Expand All @@ -61,9 +63,9 @@
/// 最少需要选择的图片数,默认为 0
@property(nonatomic, assign) NSUInteger minimumSelectImageCount;
/// 选择图片超出最大图片限制时 alertView 的标题
@property(nonatomic, copy) NSString *alertTitleWhenExceedMaxSelectImageCount;
@property(nullable, nonatomic, copy) NSString *alertTitleWhenExceedMaxSelectImageCount;
/// 选择图片超出最大图片限制时 alertView 的标题
@property(nonatomic, copy) NSString *alertButtonTitleWhenExceedMaxSelectImageCount;
@property(nullable, nonatomic, copy) NSString *alertButtonTitleWhenExceedMaxSelectImageCount;

/**
* 更新数据并刷新 UI,手工调用
Expand All @@ -73,8 +75,8 @@
* @param currentImageIndex 当前展示的图片在 imageAssetArray 的索引
* @param singleCheckMode 是否为单选模式,如果是单选模式,则不显示 checkbox
*/
- (void)updateImagePickerPreviewViewWithImagesAssetArray:(NSArray<QMUIAsset *> *)imageAssetArray
selectedImageAssetArray:(NSArray<QMUIAsset *> *)selectedImageAssetArray
- (void)updateImagePickerPreviewViewWithImagesAssetArray:(NSArray<QMUIAsset *> * _Nullable)imageAssetArray
selectedImageAssetArray:(NSArray<QMUIAsset *> * _Nullable)selectedImageAssetArray
currentImageIndex:(NSInteger)currentImageIndex
singleCheckMode:(BOOL)singleCheckMode;

Expand All @@ -83,6 +85,8 @@

@interface QMUIImagePickerPreviewViewController (UIAppearance)

+ (nonnull instancetype)appearance;
+ (instancetype)appearance;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#import "QMUIAsset.h"
#import "QMUIAssetsGroup.h"

NS_ASSUME_NONNULL_BEGIN

@class QMUIImagePickerViewController;
@class QMUIButton;

Expand Down Expand Up @@ -93,30 +95,30 @@

@interface QMUIImagePickerViewController : QMUICommonViewController <UICollectionViewDataSource, UICollectionViewDelegate, QMUIImagePickerPreviewViewControllerDelegate>

@property(nonatomic, weak) id<QMUIImagePickerViewControllerDelegate> imagePickerViewControllerDelegate;
@property(nullable, nonatomic, weak) id<QMUIImagePickerViewControllerDelegate> imagePickerViewControllerDelegate;

/*
* 图片的最小尺寸,布局时如果有剩余空间,会将空间分配给图片大小,所以最终显示出来的大小不一定等于minimumImageWidth。默认是75。
* @warning collectionViewLayout 和 collectionView 可能有设置 sectionInsets 和 contentInsets,所以设置几行不可以简单的通过 screenWdith / columnCount 来获得
*/
@property(nonatomic, assign) CGFloat minimumImageWidth UI_APPEARANCE_SELECTOR;

@property(nonatomic, strong, readonly) UICollectionViewFlowLayout *collectionViewLayout;
@property(nonatomic, strong, readonly) UICollectionView *collectionView;
@property(nullable, nonatomic, strong, readonly) UICollectionViewFlowLayout *collectionViewLayout;
@property(nullable, nonatomic, strong, readonly) UICollectionView *collectionView;

@property(nonatomic, strong, readonly) UIView *operationToolBarView;
@property(nonatomic, strong, readonly) QMUIButton *previewButton;
@property(nonatomic, strong, readonly) QMUIButton *sendButton;
@property(nonatomic, strong, readonly) UILabel *imageCountLabel;
@property(nullable, nonatomic, strong, readonly) UIView *operationToolBarView;
@property(nullable, nonatomic, strong, readonly) QMUIButton *previewButton;
@property(nullable, nonatomic, strong, readonly) QMUIButton *sendButton;
@property(nullable, nonatomic, strong, readonly) UILabel *imageCountLabel;

/// 也可以直接传入 QMUIAssetsGroup,然后读取其中的 QMUIAsset 并储存到 imagesAssetArray 中,传入后会赋值到 QMUIAssetsGroup,并自动刷新 UI 展示
- (void)refreshWithAssetsGroup:(QMUIAssetsGroup *)assetsGroup;
- (void)refreshWithAssetsGroup:(QMUIAssetsGroup * _Nullable)assetsGroup;

@property(nonatomic, strong, readonly) NSMutableArray<QMUIAsset *> *imagesAssetArray;
@property(nonatomic, strong, readonly) QMUIAssetsGroup *assetsGroup;
@property(nullable, nonatomic, strong, readonly) NSMutableArray<QMUIAsset *> *imagesAssetArray;
@property(nullable, nonatomic, strong, readonly) QMUIAssetsGroup *assetsGroup;

/// 当前被选择的图片对应的 QMUIAsset 对象数组
@property(nonatomic, strong, readonly) NSMutableArray<QMUIAsset *> *selectedImageAssetArray;
@property(nullable, nonatomic, strong, readonly) NSMutableArray<QMUIAsset *> *selectedImageAssetArray;

/// 是否允许图片多选,默认为 YES。如果为 NO,则不显示 checkbox 和底部工具栏。
@property(nonatomic, assign) BOOL allowsMultipleSelection;
Expand All @@ -128,10 +130,10 @@
@property(nonatomic, assign) NSUInteger minimumSelectImageCount;

/// 选择图片超出最大图片限制时 alertView 的标题
@property(nonatomic, copy) NSString *alertTitleWhenExceedMaxSelectImageCount;
@property(nullable, nonatomic, copy) NSString *alertTitleWhenExceedMaxSelectImageCount;

/// 选择图片超出最大图片限制时 alertView 底部按钮的标题
@property(nonatomic, copy) NSString *alertButtonTitleWhenExceedMaxSelectImageCount;
@property(nullable, nonatomic, copy) NSString *alertButtonTitleWhenExceedMaxSelectImageCount;

/**
* 加载相册列表时会出现 loading,若需要自定义 loading 的形式,可将该属性置为 NO,默认为 YES。
Expand All @@ -144,6 +146,8 @@

@interface QMUIImagePickerViewController (UIAppearance)

+ (nonnull instancetype)appearance;
+ (instancetype)appearance;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit d600800

Please sign in to comment.