Skip to content

Commit

Permalink
- Updated Objc support
Browse files Browse the repository at this point in the history
- Updated SPM Dependencies
  • Loading branch information
hackiftekhar committed Aug 12, 2024
1 parent 149f3ee commit da82ef5
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 46 deletions.
13 changes: 3 additions & 10 deletions IQKeyboardManagerSwift.podspec.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "IQKeyboardManagerSwift",
"version": "7.1.2",
"version": "7.2.0",
"source": {
"git": "https://github.com/hackiftekhar/IQKeyboardManager.git",
"tag": "7.1.2"
"tag": "7.2.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",
Expand Down Expand Up @@ -115,14 +115,7 @@
],
"resource_bundles": {"IQKeyboardManagerSwift": "IQKeyboardManagerSwift/PrivacyInfo.xcprivacy"},
"frameworks": [
"UIKit",
"Foundation",
"CoreGraphics",
"QuartzCore"
"UIKit"
],
"libraries": "swiftCoreGraphics",
"xcconfig": {
"LIBRARY_SEARCH_PATHS": "$(SDKROOT)/usr/lib/swift"
},
"requires_arc": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
// THE SOFTWARE.

import UIKit
import CoreGraphics
import QuartzCore

/**
Code-less drop-in universal library allows to prevent issues of keyboard sliding up and cover TextInputView.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation

// MARK: IQAutoToolbarManageBehavior

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIView+IQKeyboardExtensionObjc.swift
// UIView+IQKeyboardToolbarObjc.swift
// https://github.com/hackiftekhar/IQKeyboardManager
// Copyright (c) 2013-24 Iftekhar Qurashi.
//
Expand Down Expand Up @@ -206,7 +206,7 @@ import UIKit
rightConfiguration: IQBarButtonItemConfiguration,
leftConfiguration: IQBarButtonItemConfiguration,
title: String?, titleAccessibilityLabel: String? = nil) {
iq.addRightLeft(target: target, rightConfiguration: rightConfiguration
iq.addRightLeft(target: target, rightConfiguration: rightConfiguration,
leftConfiguration: leftConfiguration, title: title,
titleAccessibilityLabel: titleAccessibilityLabel)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation
import UIKit

@available(iOSApplicationExtension, unavailable)
@MainActor
public protocol IQPlaceholderable: AnyObject {
@objc public protocol IQPlaceholderable: AnyObject {

var placeholder: String? { get set }
var attributedPlaceholder: NSAttributedString? { get set }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation

// MARK: Debugging & Developer options
@available(iOSApplicationExtension, unavailable)
@MainActor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,25 @@ import UIKit
}

/**
Automatic add the toolbar functionality. Default is YES.
*/
Automatic add the toolbar functionality. Default is YES.
*/
var enableAutoToolbar: Bool {
get { toolbarManager.enable }
set { toolbarManager.enable = newValue }
}

/**
Configurations related to the toolbar display over the keyboard.
*/
Configurations related to the toolbar display over the keyboard.
*/
var toolbarConfiguration: IQToolbarConfiguration {
toolbarManager.toolbarConfiguration
}

// MARK: UISound handling

/**
If YES, then it plays inputClick sound on next/previous/done click.
*/
If YES, then it plays inputClick sound on next/previous/done click.
*/
var playInputClicks: Bool {
get { toolbarManager.playInputClicks }
set { toolbarManager.playInputClicks = newValue }
Expand Down Expand Up @@ -112,4 +112,34 @@ import UIKit
func reloadInputViews() {
toolbarManager.reloadInputViews()
}

/**
Returns YES if can navigate to previous responder textInputView, otherwise NO.
*/
var canGoPrevious: Bool {
toolbarManager.canGoPrevious
}

/**
Returns YES if can navigate to next responder textInputViews, otherwise NO.
*/
var canGoNext: Bool {
toolbarManager.canGoNext
}

/**
Navigate to previous responder textInputViews
*/
@discardableResult
func goPrevious() -> Bool {
toolbarManager.goPrevious()
}

/**
Navigate to next responder textInputView.
*/
@discardableResult
func goNext() -> Bool {
toolbarManager.goNext()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// UIView+ResignObjc.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

// MARK: For ObjectiveC Compatibility

// swiftlint:disable identifier_name
@objc public extension UITextField {

var iq_resignOnTouchOutsideMode: IQEnableMode {
get { iq.resignOnTouchOutsideMode }
set { iq.resignOnTouchOutsideMode = newValue }
}
}

@objc public extension UITextView {

var iq_resignOnTouchOutsideMode: IQEnableMode {
get { iq.resignOnTouchOutsideMode }
set { iq.resignOnTouchOutsideMode = newValue }
}
}
// swiftlint:enable identifier_name
18 changes: 13 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ let package = Package(
targets: ["IQKeyboardManagerSwift"]
)
],
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")
],
targets: [
.target(name: "IQKeyboardManagerSwift",
path: "IQKeyboardManagerSwift",
resources: [
.copy("PrivacyInfo.xcprivacy")
]
)
dependencies: ["IQKeyboardNotification", "IQTextInputViewNotification"],
path: "IQKeyboardManagerSwift",
resources: [
.copy("PrivacyInfo.xcprivacy")
],
linkerSettings: [
.linkedFramework("UIKit")
]
)
]
)
30 changes: 15 additions & 15 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ PODS:
- IQDropDownTextFieldSwift (4.0.4)
- IQKeyboardCore (1.0.5)
- IQKeyboardManager (6.5.19)
- IQKeyboardManagerSwift (7.1.2):
- IQKeyboardManagerSwift/Appearance (= 7.1.2)
- IQKeyboardManagerSwift/IQKeyboardReturnKeyHandler (= 7.1.2)
- IQKeyboardManagerSwift/IQKeyboardToolbarManager (= 7.1.2)
- IQKeyboardManagerSwift/IQTextView (= 7.1.2)
- IQKeyboardManagerSwift/Resign (= 7.1.2)
- IQKeyboardManagerSwift (7.2.0):
- IQKeyboardManagerSwift/Appearance (= 7.2.0)
- IQKeyboardManagerSwift/IQKeyboardReturnKeyHandler (= 7.2.0)
- 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.1.2):
- IQKeyboardManagerSwift/Appearance (7.2.0):
- IQKeyboardNotification (= 1.0.3)
- IQTextInputViewNotification (= 1.0.5)
- IQKeyboardManagerSwift/IQKeyboardReturnKeyHandler (7.1.2):
- IQKeyboardManagerSwift/IQKeyboardReturnKeyHandler (7.2.0):
- IQKeyboardNotification (= 1.0.3)
- IQTextInputViewNotification (= 1.0.5)
- IQKeyboardManagerSwift/IQKeyboardToolbarManager (7.1.2):
- IQKeyboardManagerSwift/IQKeyboardToolbarManager/IQKeyboardToolbar (= 7.1.2)
- IQKeyboardManagerSwift/IQKeyboardToolbarManager (7.2.0):
- IQKeyboardManagerSwift/IQKeyboardToolbarManager/IQKeyboardToolbar (= 7.2.0)
- IQKeyboardNotification (= 1.0.3)
- IQTextInputViewNotification (= 1.0.5)
- IQKeyboardManagerSwift/IQKeyboardToolbarManager/IQKeyboardToolbar (7.1.2):
- IQKeyboardManagerSwift/IQKeyboardToolbarManager/IQKeyboardToolbar (7.2.0):
- IQKeyboardNotification (= 1.0.3)
- IQTextInputViewNotification (= 1.0.5)
- IQKeyboardManagerSwift/IQTextView (7.1.2):
- IQKeyboardManagerSwift/IQTextView (7.2.0):
- IQKeyboardNotification (= 1.0.3)
- IQTextInputViewNotification (= 1.0.5)
- IQKeyboardManagerSwift/Resign (7.1.2):
- IQKeyboardManagerSwift/Resign (7.2.0):
- IQKeyboardNotification (= 1.0.3)
- IQTextInputViewNotification (= 1.0.5)
- IQKeyboardNotification (1.0.3)
Expand Down Expand Up @@ -65,12 +65,12 @@ SPEC CHECKSUMS:
IQDropDownTextFieldSwift: fe6cf39c35dae95335a651e0e08a842a49f08b57
IQKeyboardCore: 28c8bf3bcd8ba5aa1570b318cbc4da94b861711e
IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485
IQKeyboardManagerSwift: b055246b43898339425676e4612615020dc5333e
IQKeyboardManagerSwift: 16cbb0574676b9a0b0ed4e268a899804bda1161d
IQKeyboardNotification: d7382c4466c5a5adef92c7452ebf861b36050088
IQTextInputViewNotification: 4381fb828881983205fbee38f17da8a9fe2e835c
RSKPlaceholderTextView: 85cb165bfbfe160a2e7bfb6bcd77a21100ce1b52
SwiftLint: c5fa0b7eece474d43d2178b581a1242a16267347

PODFILE CHECKSUM: 6a7db793c76fb518cb0a56a6f6a97b687d031c56
PODFILE CHECKSUM: 3b40fa32174c001e42fb03b0ec3a4357e8233cf5

COCOAPODS: 1.15.2

0 comments on commit da82ef5

Please sign in to comment.