Skip to content
This repository was archived by the owner on Nov 19, 2023. It is now read-only.

Commit e22f252

Browse files
committed
public init
1 parent 0edb559 commit e22f252

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.xcuserstate
2+

KeyboardAvoiding.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'KeyboardAvoiding'
3-
s.version = '1.0.0'
3+
s.version = '1.0.1'
44
s.summary = 'KeyboardAvoiding with ease.'
55
s.description = <<-DESC
66
Watch out! We've got a keyboard here!

Sources/KeyboardAvoiding.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ open class KeyboardAvoiding {
1313
open var showAnimationBlock: ((CGRect) -> Void)?
1414
open var hideAnimationBlock: (() -> Void)?
1515

16+
public init(_ showAnimationBlock: ((CGRect) -> Void)? = nil,
17+
_ hideAnimationBlock: (() -> Void)? = nil) {
18+
19+
self.showAnimationBlock = showAnimationBlock
20+
self.hideAnimationBlock = hideAnimationBlock
21+
}
22+
1623
open func start() {
1724
NotificationCenter.default.addObserver(self,
1825
selector: #selector(self.onKeyboardShow(_:)),

0 commit comments

Comments
 (0)