Skip to content

Commit

Permalink
4.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLice committed May 6, 2020
1 parent d966c0c commit 852826c
Show file tree
Hide file tree
Showing 306 changed files with 1,409 additions and 1,161 deletions.
4 changes: 2 additions & 2 deletions QMUIConfigurationTemplate/QMUIConfigurationTemplate.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// QMUIConfigurationTemplate.h
Expand Down
7 changes: 4 additions & 3 deletions QMUIConfigurationTemplate/QMUIConfigurationTemplate.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// QMUIConfigurationTemplate.m
Expand Down Expand Up @@ -233,7 +233,8 @@ - (void)applyConfigurationTemplate {
QMUICMI.navigationBarHiddenInitially = NO; // NavigationBarHiddenInitially : QMUINavigationControllerDelegate preferredNavigationBarHidden 的初始值,默认为NO
QMUICMI.shouldFixTabBarTransitionBugInIPhoneX = NO; // ShouldFixTabBarTransitionBugInIPhoneX : 是否需要自动修复 iOS 11 下,iPhone X 的设备在 push 界面时,tabBar 会瞬间往上跳的 bug
QMUICMI.shouldFixTabBarButtonBugForAll = NO; // ShouldFixTabBarButtonBugForAll : 是否要对 iOS 12.1.1 及以后的版本也修复手势返回时 tabBarButton 布局错误的 bug(issue #410),默认为 NO
QMUICMI.shouldFixTabBarSafeAreaInsetsBugForNotchedScreen = NO; // ShouldFixTabBarSafeAreaInsetsBugForNotchedScreen : 是否要对 iOS 11 及以后的版本修复全面屏设备下 pop 界面时 UIScrollView 的 inset 会跳动导致滚动位置受影响的 bug(issue #934),默认为 NO
QMUICMI.shouldFixTabBarSafeAreaInsetsBug = NO; // ShouldFixTabBarSafeAreaInsetsBug : 是否要对 iOS 11 及以后的版本修复当存在 UITabBar 时,UIScrollView 的 inset.bottom 可能错误的 bug(issue #218 #934),默认为 YES
QMUICMI.shouldFixSearchBarMaskViewLayoutBug = NO; // ShouldFixSearchBarMaskViewLayoutBug : 是否自动修复 UISearchController.searchBar 被当作 tableHeaderView 使用时可能出现的布局 bug(issue #950)
QMUICMI.shouldPrintQMUIWarnLogToConsole = IS_DEBUG; // ShouldPrintQMUIWarnLogToConsole : 是否在出现 QMUILogWarn 时自动把这些 log 以 QMUIConsole 的方式显示到设备屏幕上
QMUICMI.sendAnalyticsToQMUITeam = YES; // SendAnalyticsToQMUITeam : 是否允许在 DEBUG 模式下上报 Bundle Identifier 和 Display Name 给 QMUI 统计用
QMUICMI.dynamicPreferredValueForIPad = NO; // DynamicPreferredValueForIPad : 当 iPad 处于 Slide Over 或 Split View 分屏模式下,宏 `PreferredValueForXXX` 是否把 iPad 视为某种屏幕宽度近似的 iPhone 来取值。
Expand Down
8 changes: 7 additions & 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 = "4.1.1"
s.version = "4.1.2"
s.summary = "致力于提高项目 UI 开发效率的解决方案"
s.description = <<-DESC
QMUI iOS 是一个致力于提高项目 UI 开发效率的解决方案,其设计目的是用于辅助快速搭建一个具备基本设计还原效果的 iOS 项目,同时利用自身提供的丰富控件及兼容处理, 让开发者能专注于业务需求而无需耗费精力在基础代码的设计上。不管是新项目的创建,或是已有项目的维护,均可使开发效率和项目质量得到大幅度提升。
Expand Down Expand Up @@ -56,6 +56,11 @@ Pod::Spec.new do |s|
sss.dependency 'QMUIKit/QMUIComponents/QMUIMultipleDelegates'
end

ss.subspec 'QMUICALayerExtension' do |sss|
sss.source_files = 'QMUIKit/QMUIComponents/CALayer+QMUIViewAnimation.{h,m}'
sss.dependency 'QMUIKit/QMUIComponents/QMUIMultipleDelegates'
end

ss.subspec 'QMUIAnimation' do |sss|
sss.source_files = 'QMUIKit/QMUIComponents/QMUIAnimation'
end
Expand Down Expand Up @@ -323,6 +328,7 @@ Pod::Spec.new do |s|

ss.subspec 'QMUIVisualEffectView' do |sss|
sss.source_files = 'QMUIKit/QMUIComponents/QMUIVisualEffectView.{h,m}'
sss.dependency 'QMUIKit/QMUIComponents/QMUICALayerExtension'
end

ss.subspec 'QMUIWindowSizeMonitor' do |sss|
Expand Down
4 changes: 2 additions & 2 deletions QMUIKit/QMUIComponents/AssetLibrary/QMUIAsset.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// QMUIAsset.h
Expand Down
4 changes: 2 additions & 2 deletions QMUIKit/QMUIComponents/AssetLibrary/QMUIAsset.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// QMUIAsset.m
Expand Down
4 changes: 2 additions & 2 deletions QMUIKit/QMUIComponents/AssetLibrary/QMUIAssetsGroup.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// QMUIAssetsGroup.h
Expand Down
4 changes: 2 additions & 2 deletions QMUIKit/QMUIComponents/AssetLibrary/QMUIAssetsGroup.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// QMUIAssetsGroup.m
Expand Down
6 changes: 3 additions & 3 deletions QMUIKit/QMUIComponents/AssetLibrary/QMUIAssetsManager.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// QMUIAssetsManager.h
Expand Down Expand Up @@ -122,7 +122,7 @@ extern void QMUISaveVideoAtPathToSavedPhotosAlbumWithAlbumAssetsGroup(NSString *
*
* @return 返回包含所有合适相册的数组
*/
+ (NSArray <PHAssetCollection *> *)fetchAllAlbumsWithAlbumContentType:(QMUIAlbumContentType)contentType showEmptyAlbum:(BOOL)showEmptyAlbum showSmartAlbum:(BOOL)showSmartAlbum;
+ (NSArray<PHAssetCollection *> *)fetchAllAlbumsWithAlbumContentType:(QMUIAlbumContentType)contentType showEmptyAlbum:(BOOL)showEmptyAlbum showSmartAlbum:(BOOL)showSmartAlbum;

/// 获取一个 PHAssetCollection 中创建日期最新的资源
+ (PHAsset *)fetchLatestAssetWithAssetCollection:(PHAssetCollection *)assetCollection;
Expand Down
16 changes: 8 additions & 8 deletions QMUIKit/QMUIComponents/AssetLibrary/QMUIAssetsManager.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// QMUIAssetsManager.m
Expand Down Expand Up @@ -91,14 +91,14 @@ + (void)requestAuthorization:(void(^)(QMUIAssetAuthorizationStatus status))handl

- (void)enumerateAllAlbumsWithAlbumContentType:(QMUIAlbumContentType)contentType showEmptyAlbum:(BOOL)showEmptyAlbum showSmartAlbumIfSupported:(BOOL)showSmartAlbumIfSupported usingBlock:(void (^)(QMUIAssetsGroup *resultAssetsGroup))enumerationBlock {
// 根据条件获取所有合适的相册,并保存到临时数组中
NSArray *tempAlbumsArray = [PHPhotoLibrary fetchAllAlbumsWithAlbumContentType:contentType showEmptyAlbum:showEmptyAlbum showSmartAlbum:showSmartAlbumIfSupported];
NSArray<PHAssetCollection *> *tempAlbumsArray = [PHPhotoLibrary fetchAllAlbumsWithAlbumContentType:contentType showEmptyAlbum:showEmptyAlbum showSmartAlbum:showSmartAlbumIfSupported];

// 创建一个 PHFetchOptions,用于 QMUIAssetsGroup 对资源的排序以及对内容类型进行控制
PHFetchOptions *phFetchOptions = [PHPhotoLibrary createFetchOptionsWithAlbumContentType:contentType];

// 遍历结果,生成对应的 QMUIAssetsGroup,并调用 enumerationBlock
for (NSUInteger i = 0; i < [tempAlbumsArray count]; i++) {
PHAssetCollection *phAssetCollection = [tempAlbumsArray objectAtIndex:i];
for (NSUInteger i = 0; i < tempAlbumsArray.count; i++) {
PHAssetCollection *phAssetCollection = tempAlbumsArray[i];
QMUIAssetsGroup *assetsGroup = [[QMUIAssetsGroup alloc] initWithPHCollection:phAssetCollection fetchAssetsOptions:phFetchOptions];
if (enumerationBlock) {
enumerationBlock(assetsGroup);
Expand Down Expand Up @@ -212,8 +212,8 @@ + (PHFetchOptions *)createFetchOptionsWithAlbumContentType:(QMUIAlbumContentType
return fetchOptions;
}

+ (NSArray <PHAssetCollection *> *)fetchAllAlbumsWithAlbumContentType:(QMUIAlbumContentType)contentType showEmptyAlbum:(BOOL)showEmptyAlbum showSmartAlbum:(BOOL)showSmartAlbum {
NSMutableArray <PHAssetCollection *> *tempAlbumsArray = [[NSMutableArray alloc] init];
+ (NSArray<PHAssetCollection *> *)fetchAllAlbumsWithAlbumContentType:(QMUIAlbumContentType)contentType showEmptyAlbum:(BOOL)showEmptyAlbum showSmartAlbum:(BOOL)showSmartAlbum {
NSMutableArray<PHAssetCollection *> *tempAlbumsArray = [[NSMutableArray alloc] init];

// 创建一个 PHFetchOptions,用于创建 QMUIAssetsGroup 对资源的排序和类型进行控制
PHFetchOptions *fetchOptions = [PHPhotoLibrary createFetchOptionsWithAlbumContentType:contentType];
Expand Down Expand Up @@ -284,7 +284,7 @@ + (PHFetchOptions *)createFetchOptionsWithAlbumContentType:(QMUIAlbumContentType
}
}

NSArray *resultAlbumsArray = [tempAlbumsArray copy];
NSArray<PHAssetCollection *> *resultAlbumsArray = [tempAlbumsArray copy];
return resultAlbumsArray;
}

Expand Down
4 changes: 2 additions & 2 deletions QMUIKit/QMUIComponents/CAAnimation+QMUI.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// CAAnimation+QMUI.h
Expand Down
4 changes: 2 additions & 2 deletions QMUIKit/QMUIComponents/CAAnimation+QMUI.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*****
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*****/
*/

//
// CAAnimation+QMUI.m
Expand Down
34 changes: 34 additions & 0 deletions QMUIKit/QMUIComponents/CALayer+QMUIViewAnimation.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* Tencent is pleased to support the open source community by making QMUI_iOS available.
* Copyright (C) 2016-2020 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
//
// CALayer+QMUIViewAnimation.h
// QMUIKit
//
// Created by ziezheng on 2020/4/4.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface CALayer (QMUIViewAnimation)

/**
开启了该属性的 CALayer 可在 +[UIView animateWithDuration:animations:] 执行动画,系统默认是不支持这种做法的。
@code
[UIView animateWithDuration:1 animations:^{
layer.frame = xxx;
} completion:nil];
@endcode
*/
@property(nonatomic, assign) BOOL qmui_viewAnimaitonEnabled;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 852826c

Please sign in to comment.