From 887cc4894275e8a83b4ed874d327a44d52a03b08 Mon Sep 17 00:00:00 2001 From: hackiftekhar Date: Tue, 29 Oct 2024 21:25:44 +0530 Subject: [PATCH] - Removed IQKeyboardToolbar related files and now using the separate pod internally --- Cartfile.resolved | 8 +- Demo.xcodeproj/project.pbxproj | 116 ------ IQKeyboardManagerSwift.podspec.json | 29 +- .../IQToolbarConfiguration.swift | 89 ----- .../IQKeyboardToolbarConstants.swift | 59 --- .../IQBarButtonItem/IQBarButtonItem.swift | 120 ------ .../IQBarButtonItemConfiguration.swift | 96 ----- .../IQBarButtonItem/IQInvocation.swift | 42 --- .../IQTitleBarButtonItem.swift | 168 --------- .../UIView+IQKeyboardToolbar.swift | 343 ------------------ .../UIView+IQKeyboardToolbarDeprecated.swift | 228 ------------ .../UIView+IQKeyboardToolbarObjc.swift | 254 ------------- .../IQKeyboardToolbar/IQToolbar.swift | 185 ---------- .../Placeholder/IQPlaceholderable.swift | 36 -- .../IQToolbarPlaceholderConfiguration.swift | 54 --- .../IQTextView+Placeholderable.swift | 30 -- Package.swift | 15 +- Podfile | 1 - Podfile.lock | 54 ++- 19 files changed, 55 insertions(+), 1872 deletions(-) delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/Configuration/IQToolbarConfiguration.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/Constants/IQKeyboardToolbarConstants.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQBarButtonItem.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQBarButtonItemConfiguration.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQInvocation.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQTitleBarButtonItem.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbar.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbarDeprecated.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbarObjc.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/IQToolbar.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/Placeholder/IQPlaceholderable.swift delete mode 100644 IQKeyboardManagerSwift/IQKeyboardToolbar/Placeholder/IQToolbarPlaceholderConfiguration.swift delete mode 100644 IQKeyboardManagerSwift/IQTextView/IQTextView+Placeholderable.swift diff --git a/Cartfile.resolved b/Cartfile.resolved index 5da6c2b0..e1c17eff 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,6 +1,6 @@ github "hackiftekhar/IQKeyboardCore" "1.0.7" github "hackiftekhar/IQKeyboardNotification" "1.0.5" -github "hackiftekhar/IQKeyboardToolbar" "1.1.0" -github "hackiftekhar/IQKeyboardToolbarManager" "1.1.0" -github "hackiftekhar/IQTextInputViewNotification" "1.0.7" -github "hackiftekhar/IQTextView" "1.0.3" +github "hackiftekhar/IQKeyboardToolbar" "1.1.1" +github "hackiftekhar/IQKeyboardToolbarManager" "1.1.1" +github "hackiftekhar/IQTextInputViewNotification" "1.0.8" +github "hackiftekhar/IQTextView" "1.0.5" diff --git a/Demo.xcodeproj/project.pbxproj b/Demo.xcodeproj/project.pbxproj index f933d2ba..b530c750 100644 --- a/Demo.xcodeproj/project.pbxproj +++ b/Demo.xcodeproj/project.pbxproj @@ -72,18 +72,6 @@ C01ED2702C6A4E57004BA157 /* IQKeyboardManager+Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2212C6A4E56004BA157 /* IQKeyboardManager+Deprecated.swift */; }; C01ED2712C6A4E57004BA157 /* IQTextFieldViewInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2232C6A4E56004BA157 /* IQTextFieldViewInfo.swift */; }; C01ED2722C6A4E57004BA157 /* IQTextFieldViewListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2242C6A4E56004BA157 /* IQTextFieldViewListener.swift */; }; - C01ED2732C6A4E57004BA157 /* IQToolbarConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2272C6A4E56004BA157 /* IQToolbarConfiguration.swift */; }; - C01ED2742C6A4E57004BA157 /* UIView+IQKeyboardToolbarDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2292C6A4E56004BA157 /* UIView+IQKeyboardToolbarDeprecated.swift */; }; - C01ED2752C6A4E57004BA157 /* UIView+IQKeyboardToolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED22A2C6A4E56004BA157 /* UIView+IQKeyboardToolbar.swift */; }; - C01ED2762C6A4E57004BA157 /* UIView+IQKeyboardToolbarObjc.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED22B2C6A4E56004BA157 /* UIView+IQKeyboardToolbarObjc.swift */; }; - C01ED2772C6A4E57004BA157 /* IQTitleBarButtonItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED22D2C6A4E56004BA157 /* IQTitleBarButtonItem.swift */; }; - C01ED2782C6A4E57004BA157 /* IQBarButtonItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED22E2C6A4E56004BA157 /* IQBarButtonItem.swift */; }; - C01ED2792C6A4E57004BA157 /* IQInvocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED22F2C6A4E56004BA157 /* IQInvocation.swift */; }; - C01ED27A2C6A4E57004BA157 /* IQBarButtonItemConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2302C6A4E56004BA157 /* IQBarButtonItemConfiguration.swift */; }; - C01ED27B2C6A4E57004BA157 /* IQKeyboardToolbarConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2322C6A4E56004BA157 /* IQKeyboardToolbarConstants.swift */; }; - C01ED27C2C6A4E57004BA157 /* IQToolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2332C6A4E56004BA157 /* IQToolbar.swift */; }; - C01ED27D2C6A4E57004BA157 /* IQPlaceholderable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2352C6A4E56004BA157 /* IQPlaceholderable.swift */; }; - C01ED27E2C6A4E57004BA157 /* IQToolbarPlaceholderConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2362C6A4E56004BA157 /* IQToolbarPlaceholderConfiguration.swift */; }; C01ED27F2C6A4E57004BA157 /* IQTextInputViewInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED2392C6A4E57004BA157 /* IQTextInputViewInfoModel.swift */; }; C01ED2802C6A4E57004BA157 /* IQKeyboardReturnKeyHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED23A2C6A4E57004BA157 /* IQKeyboardReturnKeyHandler.swift */; }; C01ED2812C6A4E57004BA157 /* IQKeyboardResignHandler+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01ED23C2C6A4E57004BA157 /* IQKeyboardResignHandler+Internal.swift */; }; @@ -161,7 +149,6 @@ C0974E102CCF9108008164EC /* IQKeyboardToolbar.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0974E0D2CCF9108008164EC /* IQKeyboardToolbar.xcframework */; }; C0974E112CCF9108008164EC /* IQKeyboardToolbarManager.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0974E0E2CCF9108008164EC /* IQKeyboardToolbarManager.xcframework */; }; C0974E122CCF9108008164EC /* IQTextView.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0974E0F2CCF9108008164EC /* IQTextView.xcframework */; }; - C09D4C602CCE7C99004FFAB4 /* IQTextView+Placeholderable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C09D4C5F2CCE7C99004FFAB4 /* IQTextView+Placeholderable.swift */; }; C0B63BA01781FAB1008D3B64 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0B63B9F1781FAB1008D3B64 /* UIKit.framework */; }; C0B63BA21781FAB1008D3B64 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0B63BA11781FAB1008D3B64 /* Foundation.framework */; }; C0B63BA41781FAB1008D3B64 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0B63BA31781FAB1008D3B64 /* CoreGraphics.framework */; }; @@ -338,18 +325,6 @@ C01ED2212C6A4E56004BA157 /* IQKeyboardManager+Deprecated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "IQKeyboardManager+Deprecated.swift"; sourceTree = ""; }; C01ED2232C6A4E56004BA157 /* IQTextFieldViewInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQTextFieldViewInfo.swift; sourceTree = ""; }; C01ED2242C6A4E56004BA157 /* IQTextFieldViewListener.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQTextFieldViewListener.swift; sourceTree = ""; }; - C01ED2272C6A4E56004BA157 /* IQToolbarConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQToolbarConfiguration.swift; sourceTree = ""; }; - C01ED2292C6A4E56004BA157 /* UIView+IQKeyboardToolbarDeprecated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+IQKeyboardToolbarDeprecated.swift"; sourceTree = ""; }; - C01ED22A2C6A4E56004BA157 /* UIView+IQKeyboardToolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+IQKeyboardToolbar.swift"; sourceTree = ""; }; - C01ED22B2C6A4E56004BA157 /* UIView+IQKeyboardToolbarObjc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+IQKeyboardToolbarObjc.swift"; sourceTree = ""; }; - C01ED22D2C6A4E56004BA157 /* IQTitleBarButtonItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQTitleBarButtonItem.swift; sourceTree = ""; }; - C01ED22E2C6A4E56004BA157 /* IQBarButtonItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQBarButtonItem.swift; sourceTree = ""; }; - C01ED22F2C6A4E56004BA157 /* IQInvocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQInvocation.swift; sourceTree = ""; }; - C01ED2302C6A4E56004BA157 /* IQBarButtonItemConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQBarButtonItemConfiguration.swift; sourceTree = ""; }; - C01ED2322C6A4E56004BA157 /* IQKeyboardToolbarConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQKeyboardToolbarConstants.swift; sourceTree = ""; }; - C01ED2332C6A4E56004BA157 /* IQToolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQToolbar.swift; sourceTree = ""; }; - C01ED2352C6A4E56004BA157 /* IQPlaceholderable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQPlaceholderable.swift; sourceTree = ""; }; - C01ED2362C6A4E56004BA157 /* IQToolbarPlaceholderConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQToolbarPlaceholderConfiguration.swift; sourceTree = ""; }; C01ED2392C6A4E57004BA157 /* IQTextInputViewInfoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQTextInputViewInfoModel.swift; sourceTree = ""; }; C01ED23A2C6A4E57004BA157 /* IQKeyboardReturnKeyHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IQKeyboardReturnKeyHandler.swift; sourceTree = ""; }; C01ED23C2C6A4E57004BA157 /* IQKeyboardResignHandler+Internal.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "IQKeyboardResignHandler+Internal.swift"; sourceTree = ""; }; @@ -429,7 +404,6 @@ C0974E0D2CCF9108008164EC /* IQKeyboardToolbar.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = IQKeyboardToolbar.xcframework; path = Carthage/Build/IQKeyboardToolbar.xcframework; sourceTree = ""; }; C0974E0E2CCF9108008164EC /* IQKeyboardToolbarManager.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = IQKeyboardToolbarManager.xcframework; path = Carthage/Build/IQKeyboardToolbarManager.xcframework; sourceTree = ""; }; C0974E0F2CCF9108008164EC /* IQTextView.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = IQTextView.xcframework; path = Carthage/Build/IQTextView.xcframework; sourceTree = ""; }; - C09D4C5F2CCE7C99004FFAB4 /* IQTextView+Placeholderable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "IQTextView+Placeholderable.swift"; sourceTree = ""; }; C0ACB0F519CF104B0057B571 /* DemoSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; C0B63B9B1781FAB1008D3B64 /* IQKeyboardManagerDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IQKeyboardManagerDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; C0B63B9F1781FAB1008D3B64 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; @@ -600,10 +574,8 @@ C01ED2082C6A4E56004BA157 /* IQKeyboardManager */, C01ED2052C6A4E56004BA157 /* IQKeyboardNotification */, C01ED2382C6A4E56004BA157 /* IQKeyboardReturnKeyHandler */, - C01ED2252C6A4E56004BA157 /* IQKeyboardToolbar */, C01ED2492C6A4E57004BA157 /* IQKeyboardToolbarManager */, C01ED2222C6A4E56004BA157 /* IQTextInputViewNotification */, - C01ED2582C6A4E57004BA157 /* IQTextView */, C01ED2042C6A4E56004BA157 /* PrivacyInfo.xcprivacy */, C01ED23B2C6A4E57004BA157 /* Resign */, C01ED1FD2C6A4E33004BA157 /* IQKeyboardManagerSwift.h */, @@ -694,73 +666,6 @@ path = IQTextInputViewNotification; sourceTree = ""; }; - C01ED2252C6A4E56004BA157 /* IQKeyboardToolbar */ = { - isa = PBXGroup; - children = ( - C01ED2262C6A4E56004BA157 /* Configuration */, - C01ED2282C6A4E56004BA157 /* IQKeyboardExtension */, - C01ED22C2C6A4E56004BA157 /* IQBarButtonItem */, - C01ED2312C6A4E56004BA157 /* Constants */, - C01ED2332C6A4E56004BA157 /* IQToolbar.swift */, - C01ED2342C6A4E56004BA157 /* Placeholder */, - C01ED2372C6A4E56004BA157 /* UIKitExtensions */, - ); - path = IQKeyboardToolbar; - sourceTree = ""; - }; - C01ED2262C6A4E56004BA157 /* Configuration */ = { - isa = PBXGroup; - children = ( - C01ED2272C6A4E56004BA157 /* IQToolbarConfiguration.swift */, - ); - path = Configuration; - sourceTree = ""; - }; - C01ED2282C6A4E56004BA157 /* IQKeyboardExtension */ = { - isa = PBXGroup; - children = ( - C01ED2292C6A4E56004BA157 /* UIView+IQKeyboardToolbarDeprecated.swift */, - C01ED22A2C6A4E56004BA157 /* UIView+IQKeyboardToolbar.swift */, - C01ED22B2C6A4E56004BA157 /* UIView+IQKeyboardToolbarObjc.swift */, - ); - path = IQKeyboardExtension; - sourceTree = ""; - }; - C01ED22C2C6A4E56004BA157 /* IQBarButtonItem */ = { - isa = PBXGroup; - children = ( - C01ED22D2C6A4E56004BA157 /* IQTitleBarButtonItem.swift */, - C01ED22E2C6A4E56004BA157 /* IQBarButtonItem.swift */, - C01ED22F2C6A4E56004BA157 /* IQInvocation.swift */, - C01ED2302C6A4E56004BA157 /* IQBarButtonItemConfiguration.swift */, - ); - path = IQBarButtonItem; - sourceTree = ""; - }; - C01ED2312C6A4E56004BA157 /* Constants */ = { - isa = PBXGroup; - children = ( - C01ED2322C6A4E56004BA157 /* IQKeyboardToolbarConstants.swift */, - ); - path = Constants; - sourceTree = ""; - }; - C01ED2342C6A4E56004BA157 /* Placeholder */ = { - isa = PBXGroup; - children = ( - C01ED2352C6A4E56004BA157 /* IQPlaceholderable.swift */, - C01ED2362C6A4E56004BA157 /* IQToolbarPlaceholderConfiguration.swift */, - ); - path = Placeholder; - sourceTree = ""; - }; - C01ED2372C6A4E56004BA157 /* UIKitExtensions */ = { - isa = PBXGroup; - children = ( - ); - path = UIKitExtensions; - sourceTree = ""; - }; C01ED2382C6A4E56004BA157 /* IQKeyboardReturnKeyHandler */ = { isa = PBXGroup; children = ( @@ -812,14 +717,6 @@ path = IQKeyboardToolbarManager; sourceTree = ""; }; - C01ED2582C6A4E57004BA157 /* IQTextView */ = { - isa = PBXGroup; - children = ( - C09D4C5F2CCE7C99004FFAB4 /* IQTextView+Placeholderable.swift */, - ); - path = IQTextView; - sourceTree = ""; - }; C01ED2AF2C6A4EFB004BA157 /* IQKeyboardManager */ = { isa = PBXGroup; children = ( @@ -1660,46 +1557,33 @@ C01ED2672C6A4E57004BA157 /* IQKeyboardManager.swift in Sources */, C01ED2832C6A4E57004BA157 /* IQKeyboardManager+Resign.swift in Sources */, C01ED26D2C6A4E57004BA157 /* IQKeyboardManager+ActiveConfiguration.swift in Sources */, - C01ED27D2C6A4E57004BA157 /* IQPlaceholderable.swift in Sources */, C01ED26C2C6A4E57004BA157 /* UITableView+IndexPaths.swift in Sources */, C01ED28B2C6A4E57004BA157 /* IQKeyboardAppearanceManager.swift in Sources */, C01ED2662C6A4E57004BA157 /* UIScrollView+IQKeyboardManagerExtension.swift in Sources */, C01ED2872C6A4E57004BA157 /* IQKeyboardAppearanceManager+Internal.swift in Sources */, - C01ED2762C6A4E57004BA157 /* UIView+IQKeyboardToolbarObjc.swift in Sources */, C01ED2632C6A4E57004BA157 /* UIScrollView+IQKeyboardManagerExtensionObjc.swift in Sources */, C01ED25F2C6A4E57004BA157 /* IQActiveConfiguration.swift in Sources */, - C01ED2792C6A4E57004BA157 /* IQInvocation.swift in Sources */, C01ED25E2C6A4E57004BA157 /* IQRootControllerConfiguration.swift in Sources */, - C01ED27E2C6A4E57004BA157 /* IQToolbarPlaceholderConfiguration.swift in Sources */, C01ED2942C6A4E57004BA157 /* IQKeyboardManager+ToolbarManager.swift in Sources */, C01ED2702C6A4E57004BA157 /* IQKeyboardManager+Deprecated.swift in Sources */, - C01ED27B2C6A4E57004BA157 /* IQKeyboardToolbarConstants.swift in Sources */, C01ED2602C6A4E57004BA157 /* IQScrollViewConfiguration.swift in Sources */, C01ED2892C6A4E57004BA157 /* IQKeyboardManager+Appearance.swift in Sources */, C01ED2822C6A4E57004BA157 /* IQKeyboardResignHandler.swift in Sources */, C01ED2692C6A4E57004BA157 /* UIViewController+ParentContainer.swift in Sources */, - C01ED2772C6A4E57004BA157 /* IQTitleBarButtonItem.swift in Sources */, C01ED2882C6A4E57004BA157 /* IQKeyboardManager+Appearance_Deprecated.swift in Sources */, C01ED2642C6A4E57004BA157 /* UIView+IQKeyboardManagerExtension.swift in Sources */, C01ED2862C6A4E57004BA157 /* IQKeyboardManager+Resign_Deprecated.swift in Sources */, - C01ED27C2C6A4E57004BA157 /* IQToolbar.swift in Sources */, - C01ED2782C6A4E57004BA157 /* IQBarButtonItem.swift in Sources */, C01ED28A2C6A4E57004BA157 /* IQKeyboardConfiguration.swift in Sources */, C01ED2622C6A4E57004BA157 /* IQKeyboardManager+Position.swift in Sources */, - C09D4C602CCE7C99004FFAB4 /* IQTextView+Placeholderable.swift in Sources */, C01ED26A2C6A4E57004BA157 /* UIView+ParentObjc.swift in Sources */, C01ED2682C6A4E57004BA157 /* UIView+Parent.swift in Sources */, C01ED25D2C6A4E57004BA157 /* IQKeyboardInfo.swift in Sources */, - C01ED27A2C6A4E57004BA157 /* IQBarButtonItemConfiguration.swift in Sources */, - C01ED2752C6A4E57004BA157 /* UIView+IQKeyboardToolbar.swift in Sources */, C01ED26B2C6A4E57004BA157 /* UICollectionView+IndexPaths.swift in Sources */, C01ED27F2C6A4E57004BA157 /* IQTextInputViewInfoModel.swift in Sources */, C01ED2652C6A4E57004BA157 /* UIView+IQKeyboardManagerExtensionObjc.swift in Sources */, - C01ED2742C6A4E57004BA157 /* UIView+IQKeyboardToolbarDeprecated.swift in Sources */, C01ED2612C6A4E57004BA157 /* IQKeyboardManager+Internal.swift in Sources */, C01ED2802C6A4E57004BA157 /* IQKeyboardReturnKeyHandler.swift in Sources */, C01ED2842C6A4E57004BA157 /* UIView+ResignObjc.swift in Sources */, - C01ED2732C6A4E57004BA157 /* IQToolbarConfiguration.swift in Sources */, C01ED2812C6A4E57004BA157 /* IQKeyboardResignHandler+Internal.swift in Sources */, C01ED2852C6A4E57004BA157 /* UIView+Resign.swift in Sources */, C01ED2712C6A4E57004BA157 /* IQTextFieldViewInfo.swift in Sources */, diff --git a/IQKeyboardManagerSwift.podspec.json b/IQKeyboardManagerSwift.podspec.json index 5ec61b8a..0f70865e 100644 --- a/IQKeyboardManagerSwift.podspec.json +++ b/IQKeyboardManagerSwift.podspec.json @@ -1,9 +1,9 @@ { "name": "IQKeyboardManagerSwift", - "version": "7.2.0", + "version": "7.3.0", "source": { "git": "https://github.com/hackiftekhar/IQKeyboardManager.git", - "tag": "7.2.0" + "tag": "7.3.0" }, "summary": "Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView.", "homepage": "https://github.com/hackiftekhar/IQKeyboardManager", @@ -20,10 +20,6 @@ "5.8", "5.9" ], - "dependencies": { - "IQKeyboardNotification": ["1.0.3"], - "IQTextInputViewNotification": ["1.0.5"] - }, "subspecs": [ { "name": "Appearance", @@ -40,13 +36,20 @@ "IQKeyboardManagerSwift/IQKeyboardManager/**/*.{swift}", "IQKeyboardManagerSwift/IQKeyboardNotification/**/*.{swift}", "IQKeyboardManagerSwift/IQTextInputViewNotification/**/*.{swift}" - ] + ], + "dependencies": { + "IQKeyboardNotification": [], + "IQTextInputViewNotification": [] + } }, { "name": "IQKeyboardReturnKeyHandler", "source_files": [ "IQKeyboardManagerSwift/IQKeyboardReturnKeyHandler/**/*.{swift}" - ] + ], + "dependencies": { + "IQKeyboardCore": [] + } }, { "name": "IQKeyboardToolbarManager", @@ -54,17 +57,14 @@ "IQKeyboardManagerSwift/IQKeyboardToolbarManager/**/*.{swift}" ], "dependencies": { + "IQKeyboardManagerSwift/Core": [], "IQKeyboardToolbarManager": [] } }, { "name": "IQTextView", - "source_files": [ - "IQKeyboardManagerSwift/IQTextView/**/*.{swift}" - ], "dependencies": { - "IQTextView": [], - "IQKeyboardToolbar": [] + "IQTextView": [] } }, { @@ -89,5 +89,8 @@ "frameworks": [ "UIKit" ], + "xcconfig": { + "ENABLE_USER_SCRIPT_SANDBOXING": "NO" + }, "requires_arc": true } diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/Configuration/IQToolbarConfiguration.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/Configuration/IQToolbarConfiguration.swift deleted file mode 100644 index 7de1323f..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/Configuration/IQToolbarConfiguration.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// IQToolbarConfiguration.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -@available(iOSApplicationExtension, unavailable) -@MainActor -@objcMembers public final class IQToolbarConfiguration: NSObject { - - /** - If YES, then uses textInputView's tintColor property, - otherwise tint color is default. Default is NO. - */ - public var useTextInputViewTintColor: Bool = false - - /** - This is used for toolbar.tintColor when textInputView.keyboardAppearance is UIKeyboardAppearanceDefault. - If useTextInputViewTintColor is YES then this property is ignored. Default is nil and uses black color. - */ - public var tintColor: UIColor? - - /** - This is used for toolbar.barTintColor. Default is nil. - */ - public var barTintColor: UIColor? - - /** - IQPreviousNextDisplayModeDefault: Show NextPrevious when there are more than 1 textInputView otherwise hide. - IQPreviousNextDisplayModeAlwaysHide: Do not show NextPrevious buttons in any case. - IQPreviousNextDisplayModeAlwaysShow: Always show nextPrevious buttons, - if there are more than 1 textInputView then both buttons will be visible but will be shown as disabled. - */ - public var previousNextDisplayMode: IQPreviousNextDisplayMode = .default - - /** - /** - IQAutoToolbarBySubviews: Creates Toolbar according to subview's hierarchy of TextInputView's in view. - IQAutoToolbarByTag: Creates Toolbar according to tag property of TextInputView's. - IQAutoToolbarByPosition: Creates Toolbar according to the y,x position - of textInputView in it's superview coordinate. - - Default is IQAutoToolbarBySubviews. - */ - AutoToolbar managing behavior. Default is IQAutoToolbarBySubviews. - */ - public var manageBehavior: IQAutoToolbarManageBehavior = .bySubviews - - /** - Buttons configuration displayed on the toolbar, the selector parameter is ignored in below configuration - */ - public var previousBarButtonConfiguration: IQBarButtonItemConfiguration? - public var nextBarButtonConfiguration: IQBarButtonItemConfiguration? - public var doneBarButtonConfiguration: IQBarButtonItemConfiguration? - - public let placeholderConfiguration: IQToolbarPlaceholderConfiguration = .init() -} - -// swiftlint:disable unused_setter_value -@available(iOSApplicationExtension, unavailable) -@MainActor -@objc public extension IQToolbarConfiguration { - - @available(*, deprecated, renamed: "useTextInputViewTintColor") - var useTextFieldTintColor: Bool { - get { fatalError() } - set {} - } -} -// swiftlint:enable unused_setter_value diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/Constants/IQKeyboardToolbarConstants.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/Constants/IQKeyboardToolbarConstants.swift deleted file mode 100644 index d6334405..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/Constants/IQKeyboardToolbarConstants.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// IQKeyboardToolbarConstants.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// MARK: IQAutoToolbarManageBehavior - -/** -`IQAutoToolbarBySubviews` - Creates Toolbar according to subview's hierarchy of textInputView's in view. - -`IQAutoToolbarByTag` - Creates Toolbar according to tag property of textInputView's. - -`IQAutoToolbarByPosition` - Creates Toolbar according to the y,x position of textInputView in it's superview coordinate. -*/ -@available(iOSApplicationExtension, unavailable) -@objc public enum IQAutoToolbarManageBehavior: Int { - case bySubviews - case byTag - case byPosition -} - -/** - `IQPreviousNextDisplayModeDefault` - Show NextPrevious when there are more than 1 textInputView otherwise hide. - - `IQPreviousNextDisplayModeAlwaysHide` - Do not show NextPrevious buttons in any case. - - `IQPreviousNextDisplayModeAlwaysShow` - Always show nextPrevious buttons, - if there are more than 1 textInputView then both buttons will be visible but will be shown as disabled. - */ -@available(iOSApplicationExtension, unavailable) -@objc public enum IQPreviousNextDisplayMode: Int { - case `default` - case alwaysHide - case alwaysShow -} diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQBarButtonItem.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQBarButtonItem.swift deleted file mode 100644 index 5abaf2c7..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQBarButtonItem.swift +++ /dev/null @@ -1,120 +0,0 @@ -// -// IQBarButtonItem.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -@available(iOSApplicationExtension, unavailable) -@MainActor -@objcMembers open class IQBarButtonItem: UIBarButtonItem { - - internal static let flexibleBarButtonItem: IQBarButtonItem = IQBarButtonItem(barButtonSystemItem: .flexibleSpace, - target: nil, action: nil) - - public override init() { - super.init() - initialize() - } - - public required init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - initialize() - } - - private func initialize() { - - let states: [UIControl.State] = [.normal, .highlighted, .disabled, .focused] - - for state in states { - - setBackgroundImage(UIImage(), for: state, barMetrics: .default) - setBackgroundImage(UIImage(), for: state, style: .plain, barMetrics: .default) - setBackButtonBackgroundImage(UIImage(), for: state, barMetrics: .default) - } - - setTitlePositionAdjustment(UIOffset(), for: .default) - setBackgroundVerticalPositionAdjustment(0, for: .default) - setBackButtonBackgroundVerticalPositionAdjustment(0, for: .default) - } - - override open var tintColor: UIColor? { - didSet { - - var textAttributes: [NSAttributedString.Key: Any] = [:] - textAttributes[.foregroundColor] = tintColor - - if let attributes: [NSAttributedString.Key: Any] = titleTextAttributes(for: .normal) { - for (key, value) in attributes { - textAttributes[key] = value - } - } - - setTitleTextAttributes(textAttributes, for: .normal) - } - } - - /** - Boolean to know if it's a system item or custom item, - we are having a limitation that we cannot override a designated initializer, - so we are manually setting this property once in initialization - */ - internal var isSystemItem: Bool = false - - /** - Additional target & action to do get callback action. - Note that setting custom target & selector doesn't affect native functionality, - this is just an additional target to get a callback. - - @param target Target object. - @param action Target Selector. - */ - open func setTarget(_ target: AnyObject?, action: Selector?) { - if let target: AnyObject = target, let action: Selector = action { - invocation = IQInvocation(target, action) - } else { - invocation = nil - } - } - - /** - Customized Invocation to be called when button is pressed. - invocation is internally created using setTarget:action: method. - */ - open var invocation: IQInvocation? { - didSet { - // We have to put this condition here because if we override this function then - // We were getting "Cannot override '_' which has been marked unavailable" in Xcode 15 - if let titleBarButton = self as? IQTitleBarButtonItem { - - if let target = invocation?.target, let action = invocation?.action { - titleBarButton.isEnabled = true - titleBarButton.titleButton?.isEnabled = true - titleBarButton.titleButton?.addTarget(target, action: action, for: .touchUpInside) - } else { - titleBarButton.isEnabled = false - titleBarButton.titleButton?.isEnabled = false - titleBarButton.titleButton?.removeTarget(nil, action: nil, for: .touchUpInside) - } - } - } - } -} diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQBarButtonItemConfiguration.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQBarButtonItemConfiguration.swift deleted file mode 100644 index 5ef189c5..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQBarButtonItemConfiguration.swift +++ /dev/null @@ -1,96 +0,0 @@ -// -// IQBarButtonItemConfiguration.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -/** - IQBarButtonItemConfiguration for creating toolbar with bar button items - */ -@available(iOSApplicationExtension, unavailable) -@MainActor -@objcMembers public final class IQBarButtonItemConfiguration: NSObject { - - public init(systemItem: UIBarButtonItem.SystemItem, action: Selector? = nil) { - self.systemItem = systemItem - self.image = nil - self.title = nil - self.action = action - super.init() - } - - public init(image: UIImage, action: Selector? = nil) { - self.systemItem = nil - self.image = image - self.title = nil - self.action = action - super.init() - } - - public init(title: String, action: Selector? = nil) { - self.systemItem = nil - self.image = nil - self.title = title - self.action = action - super.init() - } - - public let systemItem: UIBarButtonItem.SystemItem? // System Item to be used to instantiate bar button. - - public let image: UIImage? // Image to show on bar button item if it's not a system item. - - public let title: String? // Title to show on bar button item if it's not a system item. - - public var action: Selector? // action for bar button item. Usually 'doneAction:(IQBarButtonItem*)item'. - - public override var accessibilityLabel: String? { didSet { } } // Accessibility related labels - - public func apply(on oldBarButtonItem: IQBarButtonItem, target: AnyObject?) -> IQBarButtonItem { - - var newBarButtonItem: IQBarButtonItem = oldBarButtonItem - - if systemItem == nil, !oldBarButtonItem.isSystemItem { - newBarButtonItem.title = title - newBarButtonItem.accessibilityLabel = accessibilityLabel - newBarButtonItem.accessibilityIdentifier = newBarButtonItem.accessibilityLabel - newBarButtonItem.image = image - newBarButtonItem.target = target - newBarButtonItem.action = action - } else { - if let systemItem: UIBarButtonItem.SystemItem = systemItem { - newBarButtonItem = IQBarButtonItem(barButtonSystemItem: systemItem, target: target, action: action) - newBarButtonItem.isSystemItem = true - } else if let image: UIImage = image { - newBarButtonItem = IQBarButtonItem(image: image, style: .plain, target: target, action: action) - } else { - newBarButtonItem = IQBarButtonItem(title: title, style: .plain, target: target, action: action) - } - - newBarButtonItem.invocation = oldBarButtonItem.invocation - newBarButtonItem.accessibilityLabel = accessibilityLabel - newBarButtonItem.accessibilityIdentifier = oldBarButtonItem.accessibilityLabel - newBarButtonItem.isEnabled = oldBarButtonItem.isEnabled - newBarButtonItem.tag = oldBarButtonItem.tag - } - return newBarButtonItem - } -} diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQInvocation.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQInvocation.swift deleted file mode 100644 index 3aa40029..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQInvocation.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// IQInvocation.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -@available(iOSApplicationExtension, unavailable) -@MainActor -@objcMembers public final class IQInvocation: NSObject { - public weak var target: AnyObject? - public let action: Selector - - public init(_ target: AnyObject, _ action: Selector) { - self.target = target - self.action = action - } - - public func invoke(from: Any) { - - guard let target: AnyObject = target else { return } - UIApplication.shared.sendAction(action, to: target, from: from, for: UIEvent()) - } -} diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQTitleBarButtonItem.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQTitleBarButtonItem.swift deleted file mode 100644 index fcedb08b..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQBarButtonItem/IQTitleBarButtonItem.swift +++ /dev/null @@ -1,168 +0,0 @@ -// -// IQTitleBarButtonItem.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -@available(iOSApplicationExtension, unavailable) -@MainActor -@objcMembers open class IQTitleBarButtonItem: IQBarButtonItem { - - open var titleFont: UIFont? { - - didSet { - if let titleFont: UIFont = titleFont { - titleButton?.titleLabel?.font = titleFont - } else { - titleButton?.titleLabel?.font = UIFont.systemFont(ofSize: 13) - } - } - } - - override open var title: String? { - didSet { - titleButton?.setTitle(title, for: .normal) - updateAccessibility() - } - } - - /** - titleColor to be used for displaying button text when displaying title (disabled state). - */ - open var titleColor: UIColor? { - - didSet { - - if let titleColor: UIColor = titleColor { - titleButton?.setTitleColor(titleColor, for: .disabled) - } else { - titleButton?.setTitleColor(UIColor.lightGray, for: .disabled) - } - } - } - - /** - selectableTitleColor to be used for displaying button text when button is enabled. - */ - open var selectableTitleColor: UIColor? { - - didSet { - - if let selectableTitleColor: UIColor = selectableTitleColor { - titleButton?.setTitleColor(selectableTitleColor, for: .normal) - } else { - titleButton?.setTitleColor(UIColor.systemBlue, for: .normal) - } - } - } - - internal var titleButton: UIButton? - private var _titleView: UIView? - - override init() { - super.init() - } - - public convenience init(title: String?) { - - self.init(title: nil, style: .plain, target: nil, action: nil) - - _titleView = UIView() - _titleView?.backgroundColor = UIColor.clear - - titleButton = UIButton(type: .system) - titleButton?.isAccessibilityElement = false - titleButton?.isEnabled = false - titleButton?.titleLabel?.numberOfLines = 3 - titleButton?.setTitleColor(UIColor.lightGray, for: .disabled) - titleButton?.setTitleColor(UIColor.systemBlue, for: .normal) - titleButton?.backgroundColor = UIColor.clear - titleButton?.titleLabel?.textAlignment = .center - titleButton?.setTitle(title, for: .normal) - titleFont = UIFont.systemFont(ofSize: 13.0) - titleButton?.titleLabel?.font = self.titleFont - _titleView?.addSubview(titleButton!) - - let lowPriority: UILayoutPriority = UILayoutPriority(rawValue: UILayoutPriority.defaultLow.rawValue-1) - let highPriority: UILayoutPriority = UILayoutPriority(rawValue: UILayoutPriority.defaultHigh.rawValue-1) - - _titleView?.translatesAutoresizingMaskIntoConstraints = false - _titleView?.setContentHuggingPriority(lowPriority, for: .vertical) - _titleView?.setContentHuggingPriority(lowPriority, for: .horizontal) - _titleView?.setContentCompressionResistancePriority(highPriority, for: .vertical) - _titleView?.setContentCompressionResistancePriority(highPriority, for: .horizontal) - - titleButton?.translatesAutoresizingMaskIntoConstraints = false - titleButton?.setContentHuggingPriority(lowPriority, for: .vertical) - titleButton?.setContentHuggingPriority(lowPriority, for: .horizontal) - titleButton?.setContentCompressionResistancePriority(highPriority, for: .vertical) - titleButton?.setContentCompressionResistancePriority(highPriority, for: .horizontal) - - let top: NSLayoutConstraint = NSLayoutConstraint(item: titleButton!, attribute: .top, - relatedBy: .equal, - toItem: _titleView, attribute: .top, - multiplier: 1, constant: 0) - let bottom: NSLayoutConstraint = NSLayoutConstraint(item: titleButton!, attribute: .bottom, - relatedBy: .equal, - toItem: _titleView, attribute: .bottom, - multiplier: 1, constant: 0) - let leading: NSLayoutConstraint = NSLayoutConstraint(item: titleButton!, attribute: .leading, - relatedBy: .equal, - toItem: _titleView, attribute: .leading, - multiplier: 1, constant: 0) - let trailing: NSLayoutConstraint = NSLayoutConstraint(item: titleButton!, attribute: .trailing, - relatedBy: .equal, - toItem: _titleView, attribute: .trailing, - multiplier: 1, constant: 0) - - _titleView?.addConstraints([top, bottom, leading, trailing]) - - customView = _titleView - } - - required public init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - } - - private func updateAccessibility() { - if title == nil || title?.isEmpty == true { - isAccessibilityElement = false - // Swift 6: Reference to static property 'none' - // is not concurrency-safe because it involves shared mutable state -// accessibilityTraits = .none - accessibilityTraits = .init(rawValue: 0) - } else if titleButton?.isEnabled == true { - isAccessibilityElement = true - // Swift 6: Reference to static property 'button' - // is not concurrency-safe because it involves shared mutable state -// accessibilityTraits = .button - accessibilityTraits = .init(rawValue: 1) - } else { - isAccessibilityElement = true - - // Swift 6: Reference to static property 'staticText' - // is not concurrency-safe because it involves shared mutable state -// accessibilityTraits = .staticText - accessibilityTraits = .init(rawValue: 64) - } - } -} diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbar.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbar.swift deleted file mode 100644 index be99b854..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbar.swift +++ /dev/null @@ -1,343 +0,0 @@ -// -// UIView+IQKeyboardToolbar.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit -import IQKeyboardCore - -@available(iOSApplicationExtension, unavailable) -@MainActor -private struct AssociatedKeys { - static var toolbar: Int = 0 - static var hidePlaceholder: Int = 0 - static var placeholder: Int = 0 -} - -@available(iOSApplicationExtension, unavailable) -@MainActor -public extension IQKeyboardExtension where Base: IQTextInputView { - - // MARK: Toolbar - - /** - Toolbar references for better customization control. - */ - var toolbar: IQToolbar { - var toolbar: IQToolbar? = base?.inputAccessoryView as? IQToolbar - - if toolbar == nil, let base = base { - toolbar = objc_getAssociatedObject(base, &AssociatedKeys.toolbar) as? IQToolbar - } - - if let toolbar: IQToolbar = toolbar { - return toolbar - } else { - - let width: CGFloat = base?.window?.windowScene?.screen.bounds.width ?? 0 - - let frame = CGRect(origin: .zero, size: .init(width: width, height: 44)) - let newToolbar = IQToolbar(frame: frame) - - if let base = base { - objc_setAssociatedObject(base, &AssociatedKeys.toolbar, newToolbar, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - - return newToolbar - } - } - - // MARK: Toolbar title - - /** - If `hideToolbarPlaceholder` is YES, then title will not be added to the toolbar. Default to NO. - */ - var hidePlaceholder: Bool { - get { - if let base = base { - return objc_getAssociatedObject(base, &AssociatedKeys.hidePlaceholder) as? Bool ?? false - } - return false - } - set(newValue) { - if let base = base { - objc_setAssociatedObject(base, &AssociatedKeys.hidePlaceholder, - newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - toolbar.titleBarButton.title = drawingPlaceholder - } - } - } - - /** - `toolbarPlaceholder` to override default `placeholder` text when drawing text on toolbar. - */ - var placeholder: String? { - get { - if let base = base { - return objc_getAssociatedObject(base, &AssociatedKeys.placeholder) as? String - } - return nil - } - set(newValue) { - if let base = base { - // swiftlint:disable:next line_length - objc_setAssociatedObject(base, &AssociatedKeys.placeholder, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - toolbar.titleBarButton.title = drawingPlaceholder - } - } - } - - /** - `drawingToolbarPlaceholder` will be actual text used to draw on toolbar. - This would either `placeholder` or `toolbarPlaceholder`. - */ - var drawingPlaceholder: String? { - - guard !hidePlaceholder else { return nil } - - if let placeholder = placeholder, - !placeholder.isEmpty { - return placeholder - } - - guard let placeholderable: any IQPlaceholderable = base as? (any IQPlaceholderable) else { return nil } - - if let placeholder = placeholderable.attributedPlaceholder?.string, - !placeholder.isEmpty { - return placeholder - } else if let placeholder = placeholderable.placeholder { - return placeholder - } else { - return nil - } - } - - // MARK: Common - - func addToolbar(target: AnyObject?, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration? = nil, - title: String?, - titleAccessibilityLabel: String? = nil) { - guard let base = base else { return } - // Creating a toolBar for phoneNumber keyboard - let toolbar: IQToolbar = toolbar - - let items: [UIBarButtonItem] = Self.constructBarButtonItems(target: target, toolbar: toolbar, - previousConfiguration: previousConfiguration, - nextConfiguration: nextConfiguration, - rightConfiguration: rightConfiguration, - title: title, - titleAccessibilityLabel: titleAccessibilityLabel) - - // Adding button to toolBar. - toolbar.items = items - - switch base.keyboardAppearance { - case .dark: - toolbar.barStyle = .black - default: - toolbar.barStyle = .default - } - - // Setting toolbar to keyboard. - let reloadInputViews: Bool = base.inputAccessoryView != toolbar - guard reloadInputViews else { return } - - base.inputAccessoryView = toolbar - - base.reloadInputViews() - } - - // MARK: Right - func addDone(target: AnyObject?, - action: Selector, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - - let title: String? = showPlaceholder ? drawingPlaceholder : nil - - addDone(target: target, action: action, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func addDone(target: AnyObject?, - action: Selector, - title: String?, titleAccessibilityLabel: String? = nil) { - - let rightConfiguration = IQBarButtonItemConfiguration(systemItem: .done, action: action) - - addToolbar(target: target, rightConfiguration: rightConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func addRightButton(target: AnyObject?, - configuration: IQBarButtonItemConfiguration, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - let title: String? = showPlaceholder ? drawingPlaceholder : nil - addRightButton(target: target, configuration: configuration, title: title, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func addRightButton(target: AnyObject?, - configuration: IQBarButtonItemConfiguration, - title: String?, titleAccessibilityLabel: String? = nil) { - addToolbar(target: target, rightConfiguration: configuration, title: title, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - // MARK: Right/Left - func addRightLeft(target: AnyObject?, - rightConfiguration: IQBarButtonItemConfiguration, leftConfiguration: IQBarButtonItemConfiguration, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - let title: String? = showPlaceholder ? drawingPlaceholder : nil - addRightLeft(target: target, - rightConfiguration: rightConfiguration, leftConfiguration: leftConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func addRightLeft(target: AnyObject?, - rightConfiguration: IQBarButtonItemConfiguration, leftConfiguration: IQBarButtonItemConfiguration, - title: String?, titleAccessibilityLabel: String? = nil) { - addToolbar(target: target, - previousConfiguration: leftConfiguration, rightConfiguration: rightConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - // MARK: Previous/Next/Right - - func addPreviousNextRight(target: AnyObject?, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration?, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - - let title: String? = showPlaceholder ? drawingPlaceholder : nil - addPreviousNextRight(target: target, - previousConfiguration: previousConfiguration, nextConfiguration: nextConfiguration, - rightConfiguration: rightConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func addPreviousNextRight(target: AnyObject?, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration?, - title: String?, titleAccessibilityLabel: String? = nil) { - - addToolbar(target: target, - previousConfiguration: previousConfiguration, nextConfiguration: nextConfiguration, - rightConfiguration: rightConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func addPreviousNextDone(target: AnyObject?, previousAction: Selector, nextAction: Selector, doneAction: Selector, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - let title: String? = showPlaceholder ? drawingPlaceholder : nil - addPreviousNextDone(target: target, previousAction: previousAction, nextAction: nextAction, - doneAction: doneAction, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func addPreviousNextDone(target: AnyObject?, - previousAction: Selector, nextAction: Selector, doneAction: Selector, - title: String?, titleAccessibilityLabel: String? = nil) { - - let chevronUp: UIImage = UIImage(systemName: "chevron.up") ?? UIImage() - let chevronDown: UIImage = UIImage(systemName: "chevron.down") ?? UIImage() - - let previousConfiguration = IQBarButtonItemConfiguration(image: chevronUp, - action: previousAction) - let nextConfiguration = IQBarButtonItemConfiguration(image: chevronDown, - action: nextAction) - let rightConfiguration = IQBarButtonItemConfiguration(systemItem: .done, - action: doneAction) - - addToolbar(target: target, previousConfiguration: previousConfiguration, - nextConfiguration: nextConfiguration, rightConfiguration: rightConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } -} - -@available(iOSApplicationExtension, unavailable) -@MainActor -private extension IQKeyboardExtension where Base: IQTextInputView { - - private static func constructBarButtonItems(target: AnyObject?, - toolbar: IQToolbar, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration? = nil, - title: String?, - titleAccessibilityLabel: String? = nil) -> [UIBarButtonItem] { - var items: [UIBarButtonItem] = [] - - if let previousConfiguration: IQBarButtonItemConfiguration = previousConfiguration { - let prev: IQBarButtonItem = previousConfiguration.apply(on: toolbar.previousBarButton, target: target) - toolbar.previousBarButton = prev - items.append(prev) - } - - if previousConfiguration != nil, nextConfiguration != nil { - items.append(toolbar.fixedSpaceBarButton) - } - - if let nextConfiguration: IQBarButtonItemConfiguration = nextConfiguration { - let next: IQBarButtonItem = nextConfiguration.apply(on: toolbar.nextBarButton, target: target) - toolbar.nextBarButton = next - items.append(next) - } - - if !toolbar.additionalLeadingItems.isEmpty { - items.append(contentsOf: toolbar.additionalLeadingItems) - } - - // Title bar button item - do { - // Flexible space - items.append(IQBarButtonItem.flexibleBarButtonItem) - - // Title button - toolbar.titleBarButton.title = title - toolbar.titleBarButton.accessibilityLabel = titleAccessibilityLabel - toolbar.titleBarButton.accessibilityIdentifier = titleAccessibilityLabel - - toolbar.titleBarButton.customView?.frame = .zero - - items.append(toolbar.titleBarButton) - - // Flexible space - items.append(IQBarButtonItem.flexibleBarButtonItem) - } - - if !toolbar.additionalTrailingItems.isEmpty { - items.append(contentsOf: toolbar.additionalTrailingItems) - } - - if let rightConfiguration: IQBarButtonItemConfiguration = rightConfiguration { - - let done: IQBarButtonItem = rightConfiguration.apply(on: toolbar.doneBarButton, target: target) - toolbar.doneBarButton = done - items.append(done) - } - return items - } -} diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbarDeprecated.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbarDeprecated.swift deleted file mode 100644 index 52a6db2e..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbarDeprecated.swift +++ /dev/null @@ -1,228 +0,0 @@ -// -// UIView+IQKeyboardToolbarDeprecated.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -// swiftlint:disable unused_setter_value -// swiftlint:disable line_length -// swiftlint:disable function_parameter_count -@available(iOSApplicationExtension, unavailable) -@MainActor -@objc public extension UIView { - - @available(*, unavailable, renamed: "iq.toolbar") - var keyboardToolbar: IQToolbar { - get { fatalError() } - set {} - } - - @available(*, unavailable, renamed: "iq.hidePlaceholder") - var shouldHideToolbarPlaceholder: Bool { - get { false } - set {} - } - - @available(*, unavailable, renamed: "iq.placeholder") - var toolbarPlaceholder: String? { - get { nil } - set {} - } - - @available(*, unavailable, renamed: "iq.drawingPlaceholder") - var drawingToolbarPlaceholder: String? { - get { nil } - set {} - } - - @available(*, unavailable, renamed: "iq.addToolbar(target:previousConfiguration:nextConfiguration:rightConfiguration:title:titleAccessibilityLabel:)") - func addKeyboardToolbarWithTarget(target: AnyObject?, - titleText: String?, - titleAccessibilityLabel: String? = nil, - rightBarButtonConfiguration: IQBarButtonItemConfiguration?, - previousBarButtonConfiguration: IQBarButtonItemConfiguration? = nil, - nextBarButtonConfiguration: IQBarButtonItemConfiguration? = nil) { - } - - @available(*, unavailable, renamed: "iq.addDone(target:action:showPlaceholder:titleAccessibilityLabel:)") - func addDoneOnKeyboardWithTarget(_ target: AnyObject?, - action: Selector, - shouldShowPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addDone(target:action:title:titleAccessibilityLabel:)") - func addDoneOnKeyboardWithTarget(_ target: AnyObject?, - action: Selector, - titleText: String?, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightButton(target:configuration:showPlaceholder:titleAccessibilityLabel:)") - func addRightButtonOnKeyboardWithImage(_ image: UIImage, - target: AnyObject?, - action: Selector, - shouldShowPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightButton(target:configuration:title:titleAccessibilityLabel:)") - func addRightButtonOnKeyboardWithImage(_ image: UIImage, - target: AnyObject?, - action: Selector, - titleText: String?, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightButton(target:configuration:showPlaceholder:titleAccessibilityLabel:)") - func addRightButtonOnKeyboardWithText(_ text: String, - target: AnyObject?, - action: Selector, - shouldShowPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightButton(target:configuration:title:titleAccessibilityLabel:)") - func addRightButtonOnKeyboardWithText(_ text: String, - target: AnyObject?, - action: Selector, - titleText: String?, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightLeft(target:rightConfiguration:leftConfiguration:showPlaceholder:titleAccessibilityLabel:)") - func addCancelDoneOnKeyboardWithTarget(_ target: AnyObject?, - cancelAction: Selector, - doneAction: Selector, - shouldShowPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightLeft(target:rightConfiguration:leftConfiguration:showPlaceholder:titleAccessibilityLabel:)") - func addRightLeftOnKeyboardWithTarget(_ target: AnyObject?, - leftButtonTitle: String, - rightButtonTitle: String, - leftButtonAction: Selector, - rightButtonAction: Selector, - shouldShowPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightLeft(target:rightConfiguration:leftConfiguration:showPlaceholder:titleAccessibilityLabel:)") - func addRightLeftOnKeyboardWithTarget(_ target: AnyObject?, - leftButtonImage: UIImage, - rightButtonImage: UIImage, - leftButtonAction: Selector, - rightButtonAction: Selector, - shouldShowPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightLeft(target:rightConfiguration:leftConfiguration:title:titleAccessibilityLabel:)") - func addCancelDoneOnKeyboardWithTarget(_ target: AnyObject?, - cancelAction: Selector, - doneAction: Selector, - titleText: String?, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightLeft(target:rightConfiguration:leftConfiguration:title:titleAccessibilityLabel:)") - func addRightLeftOnKeyboardWithTarget(_ target: AnyObject?, - leftButtonTitle: String, - rightButtonTitle: String, - leftButtonAction: Selector, - rightButtonAction: Selector, - titleText: String?, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addRightLeft(target:rightConfiguration:leftConfiguration:title:titleAccessibilityLabel:)") - func addRightLeftOnKeyboardWithTarget(_ target: AnyObject?, - leftButtonImage: UIImage, - rightButtonImage: UIImage, - leftButtonAction: Selector, - rightButtonAction: Selector, - titleText: String?, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addPreviousNextDone(target:previousAction:nextAction:doneAction:showPlaceholder:titleAccessibilityLabel:)") - func addPreviousNextDone(_ target: AnyObject?, - previousAction: Selector, - nextAction: Selector, - doneAction: Selector, - shouldShowPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addPreviousNextDone(target:previousAction:nextAction:doneAction:title:titleAccessibilityLabel:)") - func addPreviousNextDoneOnKeyboardWithTarget(_ target: AnyObject?, - previousAction: Selector, - nextAction: Selector, - doneAction: Selector, - titleText: String?, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addPreviousNextRight(target:previousConfiguration:nextConfiguration:rightConfiguration:showPlaceholder:titleAccessibilityLabel:)") - func addPreviousNextRightOnKeyboardWithTarget(_ target: AnyObject?, - rightButtonImage: UIImage, - previousAction: Selector, - nextAction: Selector, - rightButtonAction: Selector, - shouldShowPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addPreviousNextRight(target:previousConfiguration:nextConfiguration:rightConfiguration:showPlaceholder:titleAccessibilityLabel:)") - func addPreviousNextRightOnKeyboardWithTarget(_ target: AnyObject?, - rightButtonTitle: String, - previousAction: Selector, - nextAction: Selector, - rightButtonAction: Selector, - shouldShowPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addPreviousNextRight(target:previousConfiguration:nextConfiguration:rightConfiguration:title:titleAccessibilityLabel:)") - func addPreviousNextRightOnKeyboardWithTarget(_ target: AnyObject?, - rightButtonImage: UIImage, - previousAction: Selector, - nextAction: Selector, - rightButtonAction: Selector, - titleText: String?, - titleAccessibilityLabel: String? = nil) { - } - - @available(*, unavailable, renamed: "iq.addPreviousNextRight(target:previousConfiguration:nextConfiguration:rightConfiguration:title:titleAccessibilityLabel:)") - func addPreviousNextRightOnKeyboardWithTarget(_ target: AnyObject?, - rightButtonTitle: String, - previousAction: Selector, - nextAction: Selector, - rightButtonAction: Selector, - titleText: String?, - titleAccessibilityLabel: String? = nil) { - } -} -// swiftlint:enable unused_setter_value -// swiftlint:enable line_length -// swiftlint:enable function_parameter_count diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbarObjc.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbarObjc.swift deleted file mode 100644 index bfd54535..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQKeyboardExtension/UIView+IQKeyboardToolbarObjc.swift +++ /dev/null @@ -1,254 +0,0 @@ -// -// UIView+IQKeyboardToolbarObjc.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -// MARK: For ObjectiveC Compatibility - -// swiftlint:disable identifier_name -@objc public extension UITextField { - - var iq_toolbar: IQToolbar { iq.toolbar } - - var iq_hidePlaceholder: Bool { - get { iq.hidePlaceholder } - set(newValue) { iq.hidePlaceholder = newValue } - } - - var iq_placeholder: String? { - get { iq.placeholder } - set(newValue) { iq.placeholder = newValue } - } - - var iq_drawingPlaceholder: String? { iq.drawingPlaceholder } - - func iq_addToolbar(target: AnyObject?, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration? = nil, - title: String?, - titleAccessibilityLabel: String? = nil) { - iq.addToolbar(target: target, previousConfiguration: previousConfiguration, - nextConfiguration: nextConfiguration, - rightConfiguration: rightConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addDone(target: AnyObject?, - action: Selector, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - iq.addDone(target: target, action: action, showPlaceholder: showPlaceholder, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addDone(target: AnyObject?, - action: Selector, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addDone(target: target, action: action, title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addRightButton(target: AnyObject?, - configuration: IQBarButtonItemConfiguration, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - iq.addRightButton(target: target, configuration: configuration, showPlaceholder: showPlaceholder, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addRightButton(target: AnyObject?, - configuration: IQBarButtonItemConfiguration, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addRightButton(target: target, configuration: configuration, title: title, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addRightLeft(target: AnyObject?, - rightConfiguration: IQBarButtonItemConfiguration, - leftConfiguration: IQBarButtonItemConfiguration, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - iq.addRightLeft(target: target, rightConfiguration: rightConfiguration, - leftConfiguration: leftConfiguration, showPlaceholder: showPlaceholder, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addRightLeft(target: AnyObject?, - rightConfiguration: IQBarButtonItemConfiguration, - leftConfiguration: IQBarButtonItemConfiguration, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addRightLeft(target: target, rightConfiguration: rightConfiguration, - leftConfiguration: leftConfiguration, title: title, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addPreviousNextRight(target: AnyObject?, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration?, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - iq.addPreviousNextRight(target: target, previousConfiguration: previousConfiguration, - nextConfiguration: nextConfiguration, rightConfiguration: rightConfiguration, - showPlaceholder: showPlaceholder, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addPreviousNextRight(target: AnyObject?, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration?, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addPreviousNextRight(target: target, previousConfiguration: previousConfiguration, - nextConfiguration: nextConfiguration, - rightConfiguration: rightConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addPreviousNextDone(target: AnyObject?, previousAction: Selector, - nextAction: Selector, doneAction: Selector, - showPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - iq.addPreviousNextDone(target: target, previousAction: previousAction, - nextAction: nextAction, doneAction: doneAction, - showPlaceholder: showPlaceholder, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addPreviousNextDone(target: AnyObject?, - previousAction: Selector, nextAction: Selector, doneAction: Selector, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addPreviousNextDone(target: target, previousAction: previousAction, - nextAction: nextAction, doneAction: doneAction, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } -} - -@objc public extension UITextView { - - var iq_toolbar: IQToolbar { iq.toolbar } - - var iq_hidePlaceholder: Bool { - get { iq.hidePlaceholder } - set(newValue) { iq.hidePlaceholder = newValue } - } - - var iq_placeholder: String? { - get { iq.placeholder } - set(newValue) { iq.placeholder = newValue } - } - - var iq_drawingPlaceholder: String? { iq.drawingPlaceholder } - - func iq_addToolbar(target: AnyObject?, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration? = nil, - title: String?, - titleAccessibilityLabel: String? = nil) { - iq.addToolbar(target: target, previousConfiguration: previousConfiguration, - nextConfiguration: nextConfiguration, rightConfiguration: rightConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addDone(target: AnyObject?, - action: Selector, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - iq.addDone(target: target, action: action, showPlaceholder: showPlaceholder, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addDone(target: AnyObject?, - action: Selector, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addDone(target: target, action: action, title: title, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addRightButton(target: AnyObject?, - configuration: IQBarButtonItemConfiguration, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - iq.addRightButton(target: target, configuration: configuration, - showPlaceholder: showPlaceholder, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addRightButton(target: AnyObject?, - configuration: IQBarButtonItemConfiguration, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addRightButton(target: target, configuration: configuration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addRightLeft(target: AnyObject?, - rightConfiguration: IQBarButtonItemConfiguration, - leftConfiguration: IQBarButtonItemConfiguration, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - iq.addRightLeft(target: target, rightConfiguration: rightConfiguration, - leftConfiguration: leftConfiguration, showPlaceholder: showPlaceholder, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addRightLeft(target: AnyObject?, - rightConfiguration: IQBarButtonItemConfiguration, - leftConfiguration: IQBarButtonItemConfiguration, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addRightLeft(target: target, rightConfiguration: rightConfiguration, - leftConfiguration: leftConfiguration, title: title, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addPreviousNextRight(target: AnyObject?, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration?, - showPlaceholder: Bool = false, titleAccessibilityLabel: String? = nil) { - iq.addPreviousNextRight(target: target, previousConfiguration: previousConfiguration, - nextConfiguration: nextConfiguration, rightConfiguration: rightConfiguration, - showPlaceholder: showPlaceholder, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addPreviousNextRight(target: AnyObject?, - previousConfiguration: IQBarButtonItemConfiguration? = nil, - nextConfiguration: IQBarButtonItemConfiguration? = nil, - rightConfiguration: IQBarButtonItemConfiguration?, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addPreviousNextRight(target: target, previousConfiguration: previousConfiguration, - nextConfiguration: nextConfiguration, - rightConfiguration: rightConfiguration, - title: title, titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addPreviousNextDone(target: AnyObject?, previousAction: Selector, nextAction: Selector, - doneAction: Selector, showPlaceholder: Bool = false, - titleAccessibilityLabel: String? = nil) { - iq.addPreviousNextDone(target: target, previousAction: previousAction, - nextAction: nextAction, - doneAction: doneAction, showPlaceholder: showPlaceholder, - titleAccessibilityLabel: titleAccessibilityLabel) - } - - func iq_addPreviousNextDone(target: AnyObject?, - previousAction: Selector, nextAction: Selector, doneAction: Selector, - title: String?, titleAccessibilityLabel: String? = nil) { - iq.addPreviousNextDone(target: target, previousAction: previousAction, - nextAction: nextAction, - doneAction: doneAction, title: title, - titleAccessibilityLabel: titleAccessibilityLabel) - } -} -// swiftlint:enable identifier_name diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQToolbar.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/IQToolbar.swift deleted file mode 100644 index 97a2da52..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/IQToolbar.swift +++ /dev/null @@ -1,185 +0,0 @@ -// -// IQToolbar.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -/** @abstract toolbar for IQKeyboardManager. */ -@available(iOSApplicationExtension, unavailable) -@MainActor -@objcMembers open class IQToolbar: UIToolbar { - - override public init(frame: CGRect) { - super.init(frame: frame) - - initialize() - } - - required public init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - - initialize() - } - - private func initialize() { - - sizeToFit() - - autoresizingMask = .flexibleWidth - self.isTranslucent = true - self.barTintColor = nil - - let positions: [UIBarPosition] = [.any, .bottom, .top, .topAttached] - - for position in positions { - - self.setBackgroundImage(nil, forToolbarPosition: position, barMetrics: .default) - self.setShadowImage(nil, forToolbarPosition: .any) - } - - // Background color - self.backgroundColor = nil - } - - /** - Additional bar buttons to show at the leading side. - */ - open var additionalLeadingItems: [UIBarButtonItem] = [] - - /** - Additional bar buttons to show at the trailing side. - */ - open var additionalTrailingItems: [UIBarButtonItem] = [] - - /** - Previous bar button of toolbar. - */ - private var privatePreviousBarButton: IQBarButtonItem? - open var previousBarButton: IQBarButtonItem { - get { - if privatePreviousBarButton == nil { - privatePreviousBarButton = IQBarButtonItem(image: nil, style: .plain, target: nil, action: nil) - } - return privatePreviousBarButton! - } - - set (newValue) { - privatePreviousBarButton = newValue - } - } - - /** - Next bar button of toolbar. - */ - private var privateNextBarButton: IQBarButtonItem? - open var nextBarButton: IQBarButtonItem { - get { - if privateNextBarButton == nil { - privateNextBarButton = IQBarButtonItem(image: nil, style: .plain, target: nil, action: nil) - } - return privateNextBarButton! - } - - set (newValue) { - privateNextBarButton = newValue - } - } - - /** - Title bar button of toolbar. - */ - private var privateTitleBarButton: IQTitleBarButtonItem? - open var titleBarButton: IQTitleBarButtonItem { - get { - if privateTitleBarButton == nil { - privateTitleBarButton = IQTitleBarButtonItem(title: nil) - } - return privateTitleBarButton! - } - - set (newValue) { - privateTitleBarButton = newValue - } - } - - /** - Done bar button of toolbar. - */ - private var privateDoneBarButton: IQBarButtonItem? - open var doneBarButton: IQBarButtonItem { - get { - if privateDoneBarButton == nil { - privateDoneBarButton = IQBarButtonItem(title: nil, style: .done, target: nil, action: nil) - } - return privateDoneBarButton! - } - - set (newValue) { - privateDoneBarButton = newValue - } - } - - /** - Fixed space bar button of toolbar. - */ - private var privateFixedSpaceBarButton: IQBarButtonItem? - open var fixedSpaceBarButton: IQBarButtonItem { - get { - if privateFixedSpaceBarButton == nil { - privateFixedSpaceBarButton = IQBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil) - } - privateFixedSpaceBarButton?.isSystemItem = true - privateFixedSpaceBarButton?.width = 6 - - return privateFixedSpaceBarButton! - } - - set (newValue) { - privateFixedSpaceBarButton = newValue - } - } - - override open func sizeThatFits(_ size: CGSize) -> CGSize { - var sizeThatFit: CGSize = super.sizeThatFits(size) - sizeThatFit.height = 44 - return sizeThatFit - } - - override open var tintColor: UIColor! { - - didSet { - guard let items: [UIBarButtonItem] = items else { return } - for item in items { - item.tintColor = tintColor - } - } - } -} - -@available(iOSApplicationExtension, unavailable) -@MainActor -@objc extension IQToolbar: UIInputViewAudioFeedback { - - open var enableInputClicksWhenVisible: Bool { - return true - } -} diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/Placeholder/IQPlaceholderable.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/Placeholder/IQPlaceholderable.swift deleted file mode 100644 index 11529096..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/Placeholder/IQPlaceholderable.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// IQPlaceholderable.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -@available(iOSApplicationExtension, unavailable) -@MainActor -@objc public protocol IQPlaceholderable: AnyObject { - - var placeholder: String? { get set } - var attributedPlaceholder: NSAttributedString? { get set } -} - -@available(iOSApplicationExtension, unavailable) -@MainActor -@objc extension UITextField: IQPlaceholderable { } diff --git a/IQKeyboardManagerSwift/IQKeyboardToolbar/Placeholder/IQToolbarPlaceholderConfiguration.swift b/IQKeyboardManagerSwift/IQKeyboardToolbar/Placeholder/IQToolbarPlaceholderConfiguration.swift deleted file mode 100644 index 11ed6637..00000000 --- a/IQKeyboardManagerSwift/IQKeyboardToolbar/Placeholder/IQToolbarPlaceholderConfiguration.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// IQToolbarPlaceholderConfiguration.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit - -@available(iOSApplicationExtension, unavailable) -@MainActor -@objcMembers public final class IQToolbarPlaceholderConfiguration: NSObject { - - /** - If YES, then it add the textInputView's placeholder text on toolbar. Default is YES. - */ - public var showPlaceholder: Bool = true - - /** - Placeholder Font. Default is nil. - */ - public var font: UIFont? - - /** - Placeholder Color. Default is nil. Which means lightGray - */ - public var color: UIColor? - - /** - Placeholder Button Color when it's treated as button. Default is nil. - */ - public var buttonColor: UIColor? - - /** - Placeholder accessibility Label - */ - public override var accessibilityLabel: String? { didSet { } } -} diff --git a/IQKeyboardManagerSwift/IQTextView/IQTextView+Placeholderable.swift b/IQKeyboardManagerSwift/IQTextView/IQTextView+Placeholderable.swift deleted file mode 100644 index 72791bed..00000000 --- a/IQKeyboardManagerSwift/IQTextView/IQTextView+Placeholderable.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// IQTextView.swift -// https://github.com/hackiftekhar/IQKeyboardManager -// Copyright (c) 2013-24 Iftekhar Qurashi. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import UIKit -import IQTextView -import IQKeyboardToolbar - -@available(iOSApplicationExtension, unavailable) -@MainActor -@objc extension IQTextView: IQPlaceholderable { } diff --git a/Package.swift b/Package.swift index 9ebd714d..17f665db 100644 --- a/Package.swift +++ b/Package.swift @@ -14,14 +14,19 @@ let package = Package( ) ], dependencies: [ - .package(url: "https://github.com/hackiftekhar/IQKeyboardNotification.git", from: "1.0.3"), - .package(url: "https://github.com/hackiftekhar/IQTextInputViewNotification.git", from: "1.0.5"), - .package(url: "https://github.com/hackiftekhar/IQKeyboardToolbarManager.git", from: "1.1.0"), - .package(url: "https://github.com/hackiftekhar/IQTextView.git", from: "1.0.3"), + .package(url: "https://github.com/hackiftekhar/IQKeyboardNotification.git", from: "1.0.5"), + .package(url: "https://github.com/hackiftekhar/IQTextInputViewNotification.git", from: "1.0.8"), + .package(url: "https://github.com/hackiftekhar/IQKeyboardToolbarManager.git", from: "1.1.1"), + .package(url: "https://github.com/hackiftekhar/IQTextView.git", from: "1.0.5") ], targets: [ .target(name: "IQKeyboardManagerSwift", - dependencies: ["IQKeyboardNotification", "IQTextInputViewNotification", "IQKeyboardToolbarManager", "IQTextView"], + dependencies: [ + "IQKeyboardNotification", + "IQTextInputViewNotification", + "IQKeyboardToolbarManager", + "IQTextView" + ], path: "IQKeyboardManagerSwift", resources: [ .copy("PrivacyInfo.xcprivacy") diff --git a/Podfile b/Podfile index 64d132ee..32c87599 100644 --- a/Podfile +++ b/Podfile @@ -15,7 +15,6 @@ target "DemoSwift" do pod "SwiftLint" pod "IQDropDownTextFieldSwift" pod "IQKeyboardManagerSwift", :path => "." - pod "RSKPlaceholderTextView" end diff --git a/Podfile.lock b/Podfile.lock index 606bae5d..9ec08b15 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -10,42 +10,38 @@ PODS: - IQKeyboardManagerSwift/IQKeyboardToolbarManager (= 7.2.0) - IQKeyboardManagerSwift/IQTextView (= 7.2.0) - IQKeyboardManagerSwift/Resign (= 7.2.0) - - IQKeyboardNotification (= 1.0.3) - - IQTextInputViewNotification (= 1.0.5) - IQKeyboardManagerSwift/Appearance (7.2.0): - IQKeyboardManagerSwift/Core - - IQKeyboardNotification (= 1.0.3) - - IQTextInputViewNotification (= 1.0.5) - IQKeyboardManagerSwift/Core (7.2.0): - - IQKeyboardNotification (= 1.0.3) - - IQTextInputViewNotification (= 1.0.5) + - IQKeyboardNotification + - IQTextInputViewNotification - IQKeyboardManagerSwift/IQKeyboardReturnKeyHandler (7.2.0): - - IQKeyboardNotification (= 1.0.3) - - IQTextInputViewNotification (= 1.0.5) + - IQKeyboardCore - IQKeyboardManagerSwift/IQKeyboardToolbarManager (7.2.0): - - IQKeyboardNotification (= 1.0.3) + - IQKeyboardManagerSwift/Core - IQKeyboardToolbarManager - - IQTextInputViewNotification (= 1.0.5) - IQKeyboardManagerSwift/IQTextView (7.2.0): - - IQKeyboardNotification (= 1.0.3) - - IQKeyboardToolbar - - IQTextInputViewNotification (= 1.0.5) - IQTextView - IQKeyboardManagerSwift/Resign (7.2.0): - IQKeyboardManagerSwift/Core - - IQKeyboardNotification (= 1.0.3) - - IQTextInputViewNotification (= 1.0.5) - IQKeyboardNotification (1.0.3) - - IQKeyboardToolbar (1.1.0): - - IQKeyboardCore (= 1.0.5) - - IQKeyboardToolbarManager (1.1.0): - - IQKeyboardToolbar (= 1.1.0) - - IQTextInputViewNotification (= 1.0.5) + - IQKeyboardToolbar (1.1.1): + - IQKeyboardCore + - IQKeyboardToolbar/Core (= 1.1.1) + - IQKeyboardToolbar/Core (1.1.1): + - IQKeyboardCore + - IQKeyboardToolbar/Placeholderable + - IQKeyboardToolbar/Placeholderable (1.1.1): + - IQKeyboardCore + - IQKeyboardToolbarManager (1.1.1): + - IQKeyboardToolbar + - IQTextInputViewNotification - IQTextInputViewNotification (1.0.5): - IQKeyboardCore (= 1.0.5) - - IQTextView (1.0.1) + - IQTextView (1.0.5): + - IQKeyboardToolbar/Placeholderable - RSKPlaceholderTextView (8.0.0) - - SwiftLint (0.56.1) + - SwiftLint (0.57.0) DEPENDENCIES: - IQDropDownTextField @@ -79,15 +75,15 @@ SPEC CHECKSUMS: IQDropDownTextFieldSwift: fe6cf39c35dae95335a651e0e08a842a49f08b57 IQKeyboardCore: 28c8bf3bcd8ba5aa1570b318cbc4da94b861711e IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485 - IQKeyboardManagerSwift: b5b14de113bd98833fd5c3cc76ce93191fa0503d + IQKeyboardManagerSwift: cfe8bdf286f04ad9954cb6c28b9b998a97ea0863 IQKeyboardNotification: d7382c4466c5a5adef92c7452ebf861b36050088 - IQKeyboardToolbar: 3b2b66a44d9f95c32156bc17af412411073eb693 - IQKeyboardToolbarManager: a89ff7ace5b90a2767fb457923cbf578b935cb7b + IQKeyboardToolbar: d4bdccfb78324aec2f3920659c77bb89acd33312 + IQKeyboardToolbarManager: 462d8597c59e73c34c3e7c4b18923f0c49b90e00 IQTextInputViewNotification: 4381fb828881983205fbee38f17da8a9fe2e835c - IQTextView: a6dac50cd471257bcee8852b638b73044ff5d22c + IQTextView: ae13b4922f22e6f027f62c557d9f4f236b19d5c7 RSKPlaceholderTextView: 85cb165bfbfe160a2e7bfb6bcd77a21100ce1b52 - SwiftLint: c5fa0b7eece474d43d2178b581a1242a16267347 + SwiftLint: eb47480d47c982481592c195c221d11013a679cc -PODFILE CHECKSUM: 3b40fa32174c001e42fb03b0ec3a4357e8233cf5 +PODFILE CHECKSUM: e614b88580b21d28b61be6f469e20fbe893f1525 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.0