Skip to content

Commit

Permalink
1. 整理文件夹命名;
Browse files Browse the repository at this point in the history
2. QMUIHelper 增加 is58InchScreen 用于判断 iPhone X;
3. 修复 iOS 11 下在 QMUISearchController 的搜索结果界面里以 present 的方式打开新界面后返回到搜索结果界面,导航栏会错误地盖住搜索框;
4. QMUIToastView 适配键盘升起时的布局;
5. 优化 QMUIKit.framework 里自动更新 QMUIKit.h 的 Run Script 的写法;
6. 增加 removeFloatMin() 函数用于区分 CGFLOAT_MIN 和 0,同时修复 QMUIButton layoutSubviews 里由于拿 CGFLOAT_MIN 去计算,出现精度问题,导致布局不居中;
7.
将代码里的 iOS 版本判断写法全部换成新的 available() 判断语法,并去掉 iOS 7 的代码;
8. 修复 QMUITextView 在 scrollEnabled 为 NO 时快速换行,会 crash;
9. 配置表里与 navBar 相关的属性如果为 nil 则不要执行样式修改,否则会覆盖 storyboard 里的样式
  • Loading branch information
MoLice committed Sep 22, 2017
1 parent f4a3df3 commit 9c995f1
Show file tree
Hide file tree
Showing 262 changed files with 859 additions and 943 deletions.
4 changes: 2 additions & 2 deletions QMUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Pod::Spec.new do |s|
s.homepage = "http://qmuiteam.com/ios"
s.license = 'MIT'
s.author = {"qmuiteam" => "[email protected]"}
s.source = {:git => "https://github.com/QMUI/QMUI_iOS.git", :tag => s.version.to_s}
s.social_media_url = 'https://github.com/QMUI/QMUI_iOS'
s.source = {:git => "https://github.com/MoLice/QMUI_iOS.git", :tag => s.version.to_s}
s.social_media_url = 'https://github.com/MoLice/QMUI_iOS'
s.requires_arc = true
s.documentation_url = 'http://qmuiteam.com/ios/page/document.html'
s.screenshot = 'https://cloud.githubusercontent.com/assets/1190261/26751376/63f96538-486a-11e7-81cf-5bc83a945207.png'
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>1.0</string>
<string>2.0</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 @@ -346,8 +346,11 @@ - (NSString *)assetIdentity {
}

- (void)requestPhAssetInfo:(void (^)(NSDictionary *))completion {
if (!_phAsset && completion) {
completion(nil);
if (!_phAsset) {
if (completion) {
completion(nil);
}
return;
}

if (self.assetType == QMUIAssetTypeVideo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ + (id)allocWithZone:(struct _NSZone *)zone {

- (instancetype)init {
if (self = [super init]) {
_usePhotoKit = EnforceUseAssetsLibraryForTest ? NO : ((IOS_VERSION >= 8.0) ? YES : NO);
_usePhotoKit = !EnforceUseAssetsLibraryForTest;
if (!_usePhotoKit) {
_alAssetsLibrary = [[ALAssetsLibrary alloc] init];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ @implementation QMUIAlbumViewController {

- (void)didInitialized {
[super didInitialized];
_usePhotoKit = IOS_VERSION >= 8.0;
_usePhotoKit = YES;
_shouldShowDefaultLoadingView = YES;
if (albumViewControllerAppearance) {
// 避免 albumViewControllerAppearance init 时走到这里来,导致死循环
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ + (QMUIAssetsGroup *)assetsGroupOfLastestPickerAlbumWithUserIdentify:(NSString *
NSString *contentTypeOflastAlbumKey = [NSString stringWithFormat:@"%@%@", kContentTypeOfLastAlbumKeyPrefix, userIdentify];

__block QMUIAssetsGroup *assetsGroup;
BOOL usePhotoKit = IOS_VERSION >= 8.0 ? YES : NO;
BOOL usePhotoKit = YES;

QMUIAlbumContentType albumContentType = (QMUIAlbumContentType)[userDefaults integerForKey:contentTypeOflastAlbumKey];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibB
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
self.maximumSelectImageCount = INT_MAX;
self.minimumSelectImageCount = 0;
_usePhotoKit = EnforceUseAssetsLibraryForTest ? NO : ((IOS_VERSION >= 8.0) ? YES : NO);
_usePhotoKit = !EnforceUseAssetsLibraryForTest;

if (imagePickerPreviewViewControllerAppearance) {
// 避免 imagePickerPreviewViewControllerAppearance init 时走到这里来,导致死循环
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ typedef NS_ENUM(NSInteger, QMUIAlertControllerStyle) {
/// alert按钮高度,默认44pt
@property(nonatomic, assign) CGFloat alertButtonHeight UI_APPEARANCE_SELECTOR;

/// alert头部(非按钮部分)背景色,默认值是:(IOS_VERSION < 8.0) ? UIColorWhite : UIColorMakeWithRGBA(247, 247, 247, 1)
/// alert头部(非按钮部分)背景色,默认值是:UIColorMakeWithRGBA(247, 247, 247, 1)
@property(nonatomic, strong) UIColor *alertHeaderBackgroundColor UI_APPEARANCE_SELECTOR;

/// alert按钮背景色,默认值同`alertHeaderBackgroundColor`
Expand Down Expand Up @@ -163,7 +163,7 @@ typedef NS_ENUM(NSInteger, QMUIAlertControllerStyle) {
/// sheet按钮高度,默认值是:(IOS_VERSION >= 9.0 ? 57 : 44),以保持与系统默认样式一致
@property(nonatomic, assign) CGFloat sheetButtonHeight UI_APPEARANCE_SELECTOR;

/// sheet头部(非按钮部分)背景色,默认值是:(IOS_VERSION < 8.0) ? UIColorWhite : UIColorMakeWithRGBA(247, 247, 247, 1)
/// sheet头部(非按钮部分)背景色,默认值是:UIColorMakeWithRGBA(247, 247, 247, 1)
@property(nonatomic, strong) UIColor *sheetHeaderBackgroundColor UI_APPEARANCE_SELECTOR;

/// sheet按钮背景色,默认值同`sheetHeaderBackgroundColor`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ + (void)resetAppearance {
alertControllerAppearance.alertDestructiveButtonAttributes = @{NSForegroundColorAttributeName:UIColorRed,NSFontAttributeName:UIFontMake(17),NSKernAttributeName:@(0)};
alertControllerAppearance.alertContentCornerRadius = (IOS_VERSION >= 9.0 ? 13 : 6);
alertControllerAppearance.alertButtonHeight = 44;
alertControllerAppearance.alertHeaderBackgroundColor = (IOS_VERSION < 8.0) ? UIColorWhite : UIColorMakeWithRGBA(247, 247, 247, 1);
alertControllerAppearance.alertHeaderBackgroundColor = UIColorMakeWithRGBA(247, 247, 247, 1);
alertControllerAppearance.alertButtonBackgroundColor = alertControllerAppearance.alertHeaderBackgroundColor;
alertControllerAppearance.alertButtonHighlightBackgroundColor = UIColorMake(232, 232, 232);
alertControllerAppearance.alertHeaderInsets = UIEdgeInsetsMake(20, 16, 20, 16);
Expand All @@ -160,7 +160,7 @@ + (void)resetAppearance {
alertControllerAppearance.sheetCancelButtonMarginTop = 8;
alertControllerAppearance.sheetContentCornerRadius = (IOS_VERSION >= 9.0 ? 13 : 6);
alertControllerAppearance.sheetButtonHeight = (IOS_VERSION >= 9.0 ? 57 : 44);
alertControllerAppearance.sheetHeaderBackgroundColor = (IOS_VERSION < 8.0) ? UIColorWhite : UIColorMakeWithRGBA(247, 247, 247, 1);
alertControllerAppearance.sheetHeaderBackgroundColor = UIColorMakeWithRGBA(247, 247, 247, 1);
alertControllerAppearance.sheetButtonBackgroundColor = alertControllerAppearance.sheetHeaderBackgroundColor;
alertControllerAppearance.sheetButtonHighlightBackgroundColor = UIColorMake(232, 232, 232);
alertControllerAppearance.sheetHeaderInsets = UIEdgeInsetsMake(16, 16, 16, 16);
Expand Down
File renamed without changes.
Loading

0 comments on commit 9c995f1

Please sign in to comment.