From 71289f6e5c5ae504190740cd5b9a8566251c3826 Mon Sep 17 00:00:00 2001 From: LEE <18611401994@163.com> Date: Fri, 18 Aug 2023 16:03:21 +0800 Subject: [PATCH] =?UTF-8?q?1.6.6=20`LEEAction`=E6=B7=BB=E5=8A=A0`contentEd?= =?UTF-8?q?geInsets`=20`contentVerticalAlignment`=20`contentHorizontalAlig?= =?UTF-8?q?nment`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LEEAlert/LEEAlert.h | 11 ++++++++++- LEEAlert/LEEAlert.m | 8 +++++++- LEEAlert/LEEAlertHelper.h | 2 +- LEEAlertDemo/LEEAlertDemo.xcodeproj/project.pbxproj | 8 ++++++-- UPDATELOG.md | 4 ++++ 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/LEEAlert/LEEAlert.h b/LEEAlert/LEEAlert.h index 11f05fc..84c939c 100644 --- a/LEEAlert/LEEAlert.h +++ b/LEEAlert/LEEAlert.h @@ -12,7 +12,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2023年 lee. All rights reserved. - * @version V1.6.5 + * @version V1.6.6 */ #import @@ -414,6 +414,15 @@ NS_ASSUME_NONNULL_BEGIN /** action标题的间距范围 */ @property (nonatomic, assign) UIEdgeInsets titleEdgeInsets; +/** action内容边距 */ +@property (nonatomic, assign) UIEdgeInsets contentEdgeInsets; + +/** action内容垂直对齐 */ +@property (nonatomic, assign) UIControlContentVerticalAlignment contentVerticalAlignment; + +/** action内容水平对齐 */ +@property (nonatomic, assign) UIControlContentHorizontalAlignment contentHorizontalAlignment; + /** action圆角曲率 */ @property (nonatomic, assign) CGFloat cornerRadius; diff --git a/LEEAlert/LEEAlert.m b/LEEAlert/LEEAlert.m index 0fff972..0bc54e7 100644 --- a/LEEAlert/LEEAlert.m +++ b/LEEAlert/LEEAlert.m @@ -12,7 +12,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2023年 lee. All rights reserved. - * @version V1.6.5 + * @version V1.6.6 */ #import "LEEAlert.h" @@ -1584,6 +1584,12 @@ - (void)setAction:(LEEAction *)action{ [self.titleLabel setTextAlignment:action.textAlignment]; + [self setContentEdgeInsets: action.contentEdgeInsets]; + + [self setContentVerticalAlignment:action.contentVerticalAlignment]; + + [self setContentHorizontalAlignment:action.contentHorizontalAlignment]; + if (action.font) [self.titleLabel setFont:action.font]; [self.titleLabel setAdjustsFontSizeToFitWidth:action.adjustsFontSizeToFitWidth]; diff --git a/LEEAlert/LEEAlertHelper.h b/LEEAlert/LEEAlertHelper.h index 4c673aa..05af888 100644 --- a/LEEAlert/LEEAlertHelper.h +++ b/LEEAlert/LEEAlertHelper.h @@ -13,7 +13,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2023年 lee. All rights reserved. - * @version V1.6.5 + * @version V1.6.6 */ #ifndef LEEAlertHelper_h diff --git a/LEEAlertDemo/LEEAlertDemo.xcodeproj/project.pbxproj b/LEEAlertDemo/LEEAlertDemo.xcodeproj/project.pbxproj index 5a214bb..1306f12 100644 --- a/LEEAlertDemo/LEEAlertDemo.xcodeproj/project.pbxproj +++ b/LEEAlertDemo/LEEAlertDemo.xcodeproj/project.pbxproj @@ -709,7 +709,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO; DEVELOPMENT_TEAM = 8G74YECJ4Z; INFOPLIST_FILE = LEEAlertDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.lee.alert; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -724,7 +724,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO; DEVELOPMENT_TEAM = 8G74YECJ4Z; INFOPLIST_FILE = LEEAlertDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.lee.alert; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -738,6 +738,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = B9D8DJR5J5; INFOPLIST_FILE = LEEAlertDemoTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.lee.LEEAlertDemoTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -751,6 +752,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; DEVELOPMENT_TEAM = B9D8DJR5J5; INFOPLIST_FILE = LEEAlertDemoTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.lee.LEEAlertDemoTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -763,6 +765,7 @@ buildSettings = { DEVELOPMENT_TEAM = B9D8DJR5J5; INFOPLIST_FILE = LEEAlertDemoUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.lee.LEEAlertDemoUITests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -775,6 +778,7 @@ buildSettings = { DEVELOPMENT_TEAM = B9D8DJR5J5; INFOPLIST_FILE = LEEAlertDemoUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.lee.LEEAlertDemoUITests; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/UPDATELOG.md b/UPDATELOG.md index e14be2b..895ad15 100644 --- a/UPDATELOG.md +++ b/UPDATELOG.md @@ -1,6 +1,10 @@ # LEEAlert - 更新日志 +V1.6.6 +============== +`LEEAction`添加`contentEdgeInsets` `contentVerticalAlignment` `contentHorizontalAlignment` + V1.6.5 ============== 恢复`makeKeyAndVisible`调用