├── Example ├── Cartfile ├── Cartfile.resolved ├── KeyboardHelperDemo.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── project.pbxproj └── KeyboardHelperDemo │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Info.plist │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── ViewController.swift │ └── AppDelegate.swift ├── Sources └── KeyboardHelper │ ├── KeyboardHelper.swift │ └── KeyboardAppearanceInfo.swift ├── codecov.yml ├── .gitattributes ├── KeyboardHelper.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcshareddata │ └── xcschemes │ │ └── KeyboardHelper.xcscheme └── project.pbxproj ├── KeyboardHelper ├── Supporting Files │ ├── KeyboardHelper.h │ └── Info.plist └── Classes │ ├── KeyboardHelper.swift │ └── KeyboardAppearanceInfo.swift ├── KeyboardHelperTests ├── Supporting Files │ └── Info.plist └── Tests │ ├── KeyboardAppearanceInfoTests.swift │ └── KeyboardHelperTests.swift ├── LICENSE ├── .circleci └── config.yml ├── Package.swift ├── .gitignore ├── KeyboardHelper.podspec └── README.md /Example/Cartfile: -------------------------------------------------------------------------------- 1 | github "nodes-ios/KeyboardHelper" 2 | -------------------------------------------------------------------------------- /Example/Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "nodes-ios/KeyboardHelper" "1.1.0" 2 | -------------------------------------------------------------------------------- /Sources/KeyboardHelper/KeyboardHelper.swift: -------------------------------------------------------------------------------- 1 | ../../Keyboardhelper/Classes/KeyboardHelper.swift -------------------------------------------------------------------------------- /Sources/KeyboardHelper/KeyboardAppearanceInfo.swift: -------------------------------------------------------------------------------- 1 | ../../Keyboardhelper/Classes/KeyboardAppearanceInfo.swift -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | patch: false 4 | ignore: 5 | - "KeyboardHelperTests/.*" 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | KeyboardHelper.podspec linguist-documentation 2 | KeyboardHelper/Supporting[[:space:]]Files/KeyboardHelper.h linguist-documentation 3 | -------------------------------------------------------------------------------- /KeyboardHelper.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/KeyboardHelperDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /KeyboardHelper.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /KeyboardHelper/Supporting Files/KeyboardHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // KeyboardHelper.h 3 | // KeyboardHelper 4 | // 5 | // Created by Chris Combs on 26/01/16. 6 | // Copyright © 2016 Nodes. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for KeyboardHelper. 12 | FOUNDATION_EXPORT double KeyboardHelperVersionNumber; 13 | 14 | //! Project version string for KeyboardHelper. 15 | FOUNDATION_EXPORT const unsigned char KeyboardHelperVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Example/KeyboardHelperDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /KeyboardHelperTests/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /KeyboardHelper/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Nodes Agency - iOS 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # iOS CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/ios-migrating-from-1-2/ for more details 4 | # 5 | 6 | ### KeyboardHelper config file ### 7 | 8 | version: 2 9 | jobs: 10 | build: 11 | 12 | # Specify the Xcode version to use 13 | macos: 14 | xcode: "9.4.1" 15 | 16 | steps: 17 | - checkout 18 | 19 | # Install CocoaPods 20 | # - run: 21 | # name: Install CocoaPods 22 | # command: pod install 23 | 24 | # Build the app and run tests 25 | - run: 26 | name: Build and run tests 27 | command: fastlane scan 28 | environment: 29 | SCAN_DEVICE: iPhone 6 30 | SCAN_SCHEME: KeyboardHelper 31 | 32 | # Collect XML test results data to show in the UI, 33 | # and save the same XML files under test-results folder 34 | # in the Artifacts tab 35 | - store_test_results: 36 | path: test_output/report.xml 37 | - store_artifacts: 38 | path: /tmp/test-results 39 | destination: scan-test-results 40 | - store_artifacts: 41 | path: ~/Library/Logs/scan 42 | destination: scan-logs 43 | 44 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.0 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "KeyboardHelper", 8 | platforms: [ .iOS(.v8) ], 9 | products: [ 10 | // Products define the executables and libraries produced by a package, and make them visible to other packages. 11 | .library( 12 | name: "KeyboardHelper", 13 | targets: ["KeyboardHelper"]), 14 | ], 15 | dependencies: [ 16 | // Dependencies declare other packages that this package depends on. 17 | // .package(url: /* package url */, from: "1.0.0"), 18 | ], 19 | targets: [ 20 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 21 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 22 | .target( 23 | name: "KeyboardHelper", 24 | dependencies: []), 25 | .testTarget( 26 | name: "KeyboardHelperTests", 27 | dependencies: ["KeyboardHelper"], 28 | path: "KeyboardHelperTests/Tests"), 29 | ] 30 | ) 31 | -------------------------------------------------------------------------------- /Example/KeyboardHelperDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | 3 | .DS_Store 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | 29 | ## Playgrounds 30 | timeline.xctimeline 31 | playground.xcworkspace 32 | 33 | # Swift Package Manager 34 | # 35 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 36 | # Packages/ 37 | .build/ 38 | 39 | # CocoaPods 40 | # 41 | # We recommend against adding the Pods directory to your .gitignore. However 42 | # you should judge for yourself, the pros and cons are mentioned at: 43 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 44 | # 45 | # Pods/ 46 | 47 | # Carthage 48 | # 49 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 50 | # Carthage/Checkouts 51 | Example/Carthage 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/screenshots 64 | -------------------------------------------------------------------------------- /Example/KeyboardHelperDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/KeyboardHelperDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // KeyboardHelperDemo 4 | // 5 | // Created by Marius Constantinescu on 26/02/16. 6 | // Copyright © 2016 Nodes. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import KeyboardHelper 11 | 12 | class ViewController: UIViewController, KeyboardHelperDelegate { 13 | 14 | fileprivate var tapGesture: UITapGestureRecognizer! 15 | fileprivate var keyboardHelper : KeyboardHelper? 16 | @IBOutlet weak var scrollView: UIScrollView! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | // Do any additional setup after loading the view, typically from a nib. 21 | 22 | self.tapGesture = UITapGestureRecognizer(target: self, action: #selector(ViewController.dismissKeyboard)) 23 | self.view.addGestureRecognizer(tapGesture) 24 | self.tapGesture.isEnabled = true 25 | 26 | self.keyboardHelper = KeyboardHelper(delegate: self) 27 | } 28 | 29 | func dismissKeyboard() { 30 | self.view.endEditing(true) 31 | } 32 | 33 | func keyboardWillAppear(_ info: KeyboardAppearanceInfo) { 34 | info.animateAlong({ () -> Void in 35 | let insets = UIEdgeInsetsMake(0, 0, info.endFrame.size.height, 0) 36 | self.scrollView.contentInset = insets 37 | self.scrollView.scrollIndicatorInsets = insets 38 | }) { finished in } 39 | } 40 | 41 | func keyboardWillDisappear(_ info: KeyboardAppearanceInfo) { 42 | UIView.animate(withDuration: TimeInterval(info.animationDuration), 43 | delay: 0, 44 | options: info.animationOptions, 45 | animations: { 46 | let insets = UIEdgeInsets.zero 47 | self.scrollView.contentInset = insets 48 | self.scrollView.scrollIndicatorInsets = insets 49 | }, 50 | completion:nil) 51 | } 52 | 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Example/KeyboardHelperDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // KeyboardHelperDemo 4 | // 5 | // Created by Marius Constantinescu on 26/02/16. 6 | // Copyright © 2016 Nodes. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /KeyboardHelper/Classes/KeyboardHelper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyboardHelper.swift 3 | // KeyboardHelper 4 | // 5 | // Created by Kasper Welner on 27/01/16. 6 | // Copyright © 2016 Nodes. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | 13 | /// Protocol `KeyboardHelperDelegate` requires two functions, `keyboardWillAppear` and `keyboardWillDisappear` with parameter `info` struct `KeyboardAppearanceInfo`. 14 | public protocol KeyboardHelperDelegate: class { 15 | 16 | 17 | /// This function will recongnize a change of `KeyboardAppearanceInfo` and will be fired when the keyboard will appaear. 18 | /// 19 | /// - Parameter info: Struct `KeyboardAppearanceInfo`. 20 | func keyboardWillAppear(_ info: KeyboardAppearanceInfo) 21 | 22 | 23 | /// This function will recongnize a change of `KeyboardAppearanceInfo` and will be fired when the keyboard will disappaear. 24 | /// 25 | /// - Parameter info: Struct `KeyboardAppearanceInfo`. 26 | func keyboardWillDisappear(_ info: KeyboardAppearanceInfo) 27 | } 28 | 29 | /// Hack to make protocol methods optional 30 | public extension KeyboardHelperDelegate { 31 | func keyboardWillAppear(_ info: KeyboardAppearanceInfo) {} 32 | func keyboardWillDisappear(_ info: KeyboardAppearanceInfo) {} 33 | } 34 | 35 | /// Useful helper to keep track of keyboard changes. 36 | public class KeyboardHelper { 37 | 38 | /// Delegate that conforms with the `KeyboardHelperDelegate`. 39 | public weak var delegate: KeyboardHelperDelegate? 40 | 41 | /// Initialize the `delegate` and add the two observer for `keyboardWillAppear` and `keyboardWillDisappear`. 42 | /// Observers are nessecary for tracking the `UIKeyboardWillShowNotification` and `UIKeyboardWillHideNotification`, so the function that are connectet are getting fired. 43 | /// 44 | /// - Parameter delegate: KeyboardHelperDelegate 45 | required public init(delegate: KeyboardHelperDelegate) { 46 | self.delegate = delegate 47 | 48 | NotificationCenter.default.addObserver(self, selector: #selector(KeyboardHelper.keyboardWillAppear(_:)), name: UIResponder.keyboardWillShowNotification, object: nil) 49 | NotificationCenter.default.addObserver(self, selector: #selector(KeyboardHelper.keyboardWillDisappear(_:)), name: UIResponder.keyboardWillHideNotification, object: nil) 50 | } 51 | 52 | 53 | /// Making sure that you can't intantiate it without a delegate 54 | private init() { 55 | delegate = nil 56 | } 57 | 58 | @objc dynamic private func keyboardWillAppear(_ note: Notification) { 59 | let info = KeyboardAppearanceInfo(notification: note) 60 | self.delegate?.keyboardWillAppear(info) 61 | } 62 | 63 | @objc dynamic private func keyboardWillDisappear(_ note: Notification) { 64 | let info = KeyboardAppearanceInfo(notification: note) 65 | self.delegate?.keyboardWillDisappear(info) 66 | } 67 | 68 | deinit { 69 | NotificationCenter.default.removeObserver(self) 70 | } 71 | } 72 | 73 | @available(*, deprecated, message: "KeyboardNotificationDelegate has been renamed to KeyboardHelperDelegate") 74 | public typealias KeyboardNotificationDelegate = KeyboardHelperDelegate 75 | -------------------------------------------------------------------------------- /KeyboardHelper/Classes/KeyboardAppearanceInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyboardAppearanceInfo.swift 3 | // KeyboardHelper 4 | // 5 | // Created by Kasper Welner on 04/02/16. 6 | // Copyright © 2016 Nodes. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /// A struct holding all keyboard view information when it's being shown or hidden. 13 | public struct KeyboardAppearanceInfo { 14 | 15 | public let notification: Notification 16 | public let userInfo: [AnyHashable: Any] 17 | 18 | public init(notification: Notification) { 19 | self.notification = notification 20 | self.userInfo = notification.userInfo ?? [:] 21 | } 22 | 23 | /// Getter for the UIKeyboard frame begin infokey. Returns a `CGRect` or `CGRectZero`. 24 | public var beginFrame: CGRect { 25 | return (userInfo[UIResponder.keyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue ?? .zero 26 | } 27 | 28 | 29 | /// Getter for the UIKeyboard frame end infokey. Return a `CGRect` or `CGRectZero`. 30 | public var endFrame: CGRect { 31 | return (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue ?? .zero 32 | } 33 | 34 | 35 | @available(iOS 9.0, *) 36 | /// Getter for the UIKeyboard info if the keyboard is in the current app. 37 | /// That variable will help to keep track of which app uses the keyboard at the moment. 38 | /// If it is the current app it is true, if not it is false. 39 | public var belongsToCurrentApp: Bool { 40 | return (userInfo[UIResponder.keyboardIsLocalUserInfoKey] as? Bool) ?? true 41 | 42 | } 43 | 44 | 45 | /// Getter for the duration of the keyboard appear/disappear animation. 46 | /// By default: `0.25`. 47 | public var animationDuration: Double { 48 | return (userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber)?.doubleValue ?? 0.25 49 | } 50 | 51 | /// Getter for the animation curve. 52 | /// By default: `EaseInOut`. 53 | public var animationCurve: UIView.AnimationCurve { 54 | guard let value = userInfo[UIResponder.keyboardAnimationCurveUserInfoKey] as? Int else { return .easeInOut } 55 | return UIView.AnimationCurve(rawValue: value) ?? .easeInOut 56 | } 57 | 58 | 59 | /// Getter for the animation option. 60 | /// That variable will help to keep track of the keyboard appearence. 61 | public var animationOptions: UIView.AnimationOptions { 62 | return UIView.AnimationOptions(rawValue: UInt(animationCurve.rawValue << 16)) 63 | } 64 | 65 | /// Animate a `UView` while the keyboard appears and check if animation is finished. 66 | /// If finished do completion. 67 | /// 68 | /// Parameters: 69 | /// - animationBlock: Animation that should happen. 70 | /// - completion: Function that happens after the animation is finished. 71 | public func animateAlong(_ animationBlock: @escaping (() -> Void), completion: @escaping ((_ finished: Bool) -> Void) = { _ in }) { 72 | UIView.animate( 73 | withDuration: animationDuration, 74 | delay: 0.0, 75 | options: animationOptions, 76 | animations: animationBlock, 77 | completion: completion 78 | )} 79 | } 80 | -------------------------------------------------------------------------------- /KeyboardHelper.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint KeyboardHelper.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "KeyboardHelper" 19 | s.version = "3.0.0" 20 | s.summary = "Handle UIKeyboard with ease, delegation and strongly typed user info included!" 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = <<-DESC 28 | A small (but cool) tool for handling UIKeyboard appearing and disappearing in your view controllers. 29 | DESC 30 | 31 | s.homepage = "https://github.com/nodes-ios/KeyboardHelper" 32 | 33 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 34 | # 35 | # Licensing your code is important. See http://choosealicense.com for more info. 36 | # CocoaPods will detect a license file if there is a named LICENSE* 37 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 38 | # 39 | 40 | s.license = "MIT" 41 | 42 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 43 | # 44 | # Specify the authors of the library, with email addresses. Email addresses 45 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 46 | # accepts just a name if you'd rather not provide an email address. 47 | # 48 | # Specify a social_media_url where others can refer to, for example a twitter 49 | # profile URL. 50 | # 51 | 52 | s.author = { "Nodes Agency - iOS" => "ios@nodes.dk" } 53 | 54 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 55 | # 56 | # If this Pod runs only on iOS or OS X, then specify the platform and 57 | # the deployment target. You can optionally include the target after the platform. 58 | # 59 | 60 | s.platform = :ios, "8.0" 61 | s.swift_version = "5.0" 62 | 63 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 64 | # 65 | # Specify the location from where the source should be retrieved. 66 | # Supports git, hg, bzr, svn and HTTP. 67 | # 68 | 69 | s.source = { :git => "https://github.com/nodes-ios/KeyboardHelper.git", :tag => s.version } 70 | 71 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 72 | # 73 | # CocoaPods is smart about how it includes source code. For source files 74 | # giving a folder will include any swift, h, m, mm, c & cpp files. 75 | # For header files it will include any header in the folder. 76 | # Not including the public_header_files will make all headers public. 77 | # 78 | 79 | s.source_files = "KeyboardHelper/Classes" 80 | # s.exclude_files = "Classes/Exclude" 81 | # s.public_header_files = "KeyboardHelper/Supporting Files/*.h" 82 | 83 | end 84 | -------------------------------------------------------------------------------- /KeyboardHelperTests/Tests/KeyboardAppearanceInfoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyboardAppearanceInfoTests.swift 3 | // KeyboardHelper 4 | // 5 | // Created by Timmi Trinks on 05/02/16. 6 | // Copyright © 2016 Nodes. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import KeyboardHelper 11 | 12 | class KeyboardAppearanceInfoTests: XCTestCase { 13 | 14 | var appearanceInfo: KeyboardAppearanceInfo! 15 | var defaultsAppearanceInfo : KeyboardAppearanceInfo! 16 | 17 | override func setUp() { 18 | super.setUp() 19 | 20 | // Create test info 21 | var testUserInfo: [String: Any] = [ 22 | UIResponder.keyboardFrameBeginUserInfoKey: NSValue(cgRect: CGRect(x: 100, y: 100, width: 100, height: 100)), 23 | UIResponder.keyboardFrameEndUserInfoKey: NSValue(cgRect: CGRect(x: 200, y: 200, width: 200, height: 200)), 24 | UIResponder.keyboardAnimationDurationUserInfoKey: 3.0, 25 | UIResponder.keyboardAnimationCurveUserInfoKey: NSNumber(integerLiteral: UIView.AnimationCurve.easeOut.rawValue), 26 | ] 27 | 28 | if #available(iOS 9.0, *) { 29 | testUserInfo[UIResponder.keyboardIsLocalUserInfoKey] = false 30 | } else { 31 | print("UIKeyboardIsLocalUserInfoKey is not available before iOS9.") 32 | } 33 | 34 | // Fake the notification 35 | let note = Notification(name: UIResponder.keyboardWillShowNotification, object: nil, userInfo: testUserInfo) 36 | appearanceInfo = KeyboardAppearanceInfo(notification: note) 37 | let defaultNote = Notification(name: UIResponder.keyboardWillShowNotification, object: nil, userInfo: nil) 38 | defaultsAppearanceInfo = KeyboardAppearanceInfo(notification: defaultNote) 39 | } 40 | 41 | func testBeginFrame() { 42 | XCTAssertEqual(appearanceInfo.beginFrame, CGRect(x: 100, y: 100, width: 100, height: 100), 43 | "Parsing beginFrame from keyboard appearance info failed.") 44 | XCTAssertEqual(defaultsAppearanceInfo.beginFrame, CGRect.zero, 45 | "Parsing default beginFrame from keyboard appearance info failed.") 46 | } 47 | 48 | func testEndFrame() { 49 | XCTAssertEqual(appearanceInfo.endFrame, CGRect(x: 200, y: 200, width: 200, height: 200), 50 | "Parsing endFrame from keyboard appearance info failed.") 51 | XCTAssertEqual(defaultsAppearanceInfo.endFrame, CGRect.zero, 52 | "Parsing default endFrame from keyboard appearance info failed.") 53 | } 54 | 55 | @available(iOS 9.0, *) 56 | func testBelongsToCurrentApp() { 57 | XCTAssertEqual(appearanceInfo.belongsToCurrentApp, false, 58 | "Parsing belongsToCurrentApp from keyboard appearance info failed.") 59 | XCTAssertEqual(defaultsAppearanceInfo.belongsToCurrentApp, true, 60 | "Parsing default belongsToCurrentApp from keyboard appearance info failed.") 61 | } 62 | 63 | func testAnimationDuration() { 64 | 65 | XCTAssertEqual(appearanceInfo.animationDuration, Double(3), 66 | "Parsing animationDuration from keyboard appearance info failed.") 67 | XCTAssertEqual(defaultsAppearanceInfo.animationDuration, Double(0.25), 68 | "Parsing default animationDuration from keyboard appearance info failed.") 69 | } 70 | 71 | func testAnimationCurve() { 72 | XCTAssertEqual(appearanceInfo.animationCurve, UIView.AnimationCurve.easeOut, 73 | "Parsing animationCurve from keyboard appearance info failed.") 74 | XCTAssertEqual(defaultsAppearanceInfo.animationCurve, UIView.AnimationCurve.easeInOut, 75 | "Parsing default animationCurve from keyboard appearance info failed.") 76 | } 77 | 78 | func testAnimateAlong() { 79 | let expectation = self.expectation(description: "Animate along should take 3 seconds") 80 | 81 | appearanceInfo.animateAlong({ () -> Void in 82 | // Do animations 83 | }) { (finished) -> Void in 84 | if finished { 85 | expectation.fulfill() 86 | } 87 | } 88 | 89 | waitForExpectations(timeout: 3.005, handler: nil) 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /KeyboardHelper.xcodeproj/xcshareddata/xcschemes/KeyboardHelper.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 39 | 40 | 41 | 42 | 44 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 62 | 63 | 64 | 65 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /KeyboardHelperTests/Tests/KeyboardHelperTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyboardHelperTests.swift 3 | // KeyboardHelperTests 4 | // 5 | // Created by Chris Combs on 26/01/16. 6 | // Copyright © 2016 Nodes. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import KeyboardHelper 11 | 12 | class ShowSpyDelegate : KeyboardHelperDelegate { 13 | var kai : KeyboardAppearanceInfo? 14 | 15 | var expectation : XCTestExpectation? 16 | 17 | func keyboardWillDisappear(_ info: KeyboardAppearanceInfo) { 18 | 19 | } 20 | 21 | func keyboardWillAppear(_ info: KeyboardAppearanceInfo) { 22 | guard let expectation = expectation else { 23 | XCTFail("ShowSpyDelegate was not setup correctly. Missing XCTExpectation reference") 24 | return 25 | } 26 | 27 | kai = info 28 | expectation.fulfill() 29 | } 30 | } 31 | 32 | class HideSpyDelegate : KeyboardHelperDelegate { 33 | var kai : KeyboardAppearanceInfo? 34 | 35 | var expectation : XCTestExpectation? 36 | 37 | func keyboardWillDisappear(_ info: KeyboardAppearanceInfo) { 38 | guard let expectation = expectation else { 39 | XCTFail("HideSpyDelegate was not setup correctly. Missing XCTExpectation reference") 40 | return 41 | } 42 | 43 | kai = info 44 | expectation.fulfill() 45 | } 46 | } 47 | 48 | class KeyboardHelperTests: XCTestCase { 49 | 50 | func testKeyboardShowDelegateMethodIsCalledAsync() { 51 | let spyDelegate = ShowSpyDelegate() 52 | let kh = KeyboardHelper(delegate: spyDelegate) 53 | 54 | let expectation = self.expectation(description: "KeyboardHelper calls the delegate as the result of receiving the show notification") 55 | spyDelegate.expectation = expectation 56 | 57 | // NSNotificationCenter.defaultCenter().postNotificationName(UIKeyboardWillShowNotification, object: kh) 58 | let notification : Notification 59 | if #available(iOS 9.0, *) { 60 | notification = Notification(name: UIResponder.keyboardWillShowNotification, object: kh, userInfo:[ 61 | UIResponder.keyboardAnimationCurveUserInfoKey : NSNumber(value: 7), 62 | UIResponder.keyboardAnimationDurationUserInfoKey : NSNumber(value: 0.25), 63 | UIResponder.keyboardFrameBeginUserInfoKey : NSValue(cgRect: CGRect(x: 0, y: 667, width: 375, height: 0)), 64 | UIResponder.keyboardFrameEndUserInfoKey : NSValue(cgRect: CGRect(x: 0, y: 409, width: 375, height: 258)), 65 | UIResponder.keyboardIsLocalUserInfoKey : NSNumber(value: true) 66 | ]) 67 | } else { 68 | notification = Notification(name: UIResponder.keyboardWillShowNotification, object: nil, userInfo:[ 69 | UIResponder.keyboardAnimationCurveUserInfoKey : NSNumber(value: 7), 70 | UIResponder.keyboardAnimationDurationUserInfoKey : NSNumber(value: 0.25), 71 | UIResponder.keyboardFrameBeginUserInfoKey : NSValue(cgRect: CGRect(x: 0, y: 667, width: 375, height: 0)), 72 | UIResponder.keyboardFrameEndUserInfoKey : NSValue(cgRect: CGRect(x: 0, y: 409, width: 375, height: 258)) 73 | ]) 74 | } 75 | 76 | NotificationCenter.default.post(notification) 77 | 78 | 79 | 80 | waitForExpectations(timeout: 1) { error in 81 | if let error = error { 82 | XCTFail("waitForExpectationsWithTimeout errored: \(error)") 83 | } 84 | 85 | guard let result = spyDelegate.kai else { 86 | XCTFail("Expected delegate to be called") 87 | return 88 | } 89 | XCTAssertNotNil(result) 90 | XCTAssertEqual(result.animationCurve, UIView.AnimationCurve(rawValue: 7)) 91 | XCTAssertEqual(result.animationDuration, 0.25) 92 | XCTAssertEqual(result.beginFrame, CGRect(x: 0, y: 667, width: 375, height: 0)) 93 | XCTAssertEqual(result.endFrame, CGRect(x: 0, y: 409, width: 375, height: 258)) 94 | if #available(iOS 9.0, *) { 95 | XCTAssertEqual(result.belongsToCurrentApp, true) 96 | } else { 97 | // don't test this 98 | } 99 | 100 | } 101 | } 102 | 103 | func testKeyboardHideDelegateMethodIsCalledAsync() { 104 | let spyDelegate = HideSpyDelegate() 105 | let kh = KeyboardHelper(delegate: spyDelegate) 106 | 107 | let expectation = self.expectation(description: "KeyboardHelper calls the delegate as the result of receiving the hide notification") 108 | spyDelegate.expectation = expectation 109 | 110 | NotificationCenter.default.post(name: UIResponder.keyboardWillHideNotification, object: kh) 111 | 112 | 113 | waitForExpectations(timeout: 1) { error in 114 | if let error = error { 115 | XCTFail("waitForExpectationsWithTimeout errored: \(error)") 116 | } 117 | 118 | guard let result = spyDelegate.kai else { 119 | XCTFail("Expected delegate to be called") 120 | return 121 | } 122 | 123 | XCTAssertNotNil(result) 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### This library has been deprecated and the repo has been archived. 2 | ### The code is still here and you can still clone it, however the library will not receive any more updates or support. 3 | 4 | # KeyboardHelper 5 | > No more checking for keyboard notifications and parsing keyboard apperance info manually! 6 | 7 | A small (but cool) tool for handling UIKeyboard appearing and disappearing in your view controllers. 8 | 9 | [![CircleCI](https://circleci.com/gh/nodes-ios/KeyboardHelper.svg?style=shield)](https://circleci.com/gh/nodes-ios/KeyboardHelper) 10 | [![Codecov](https://img.shields.io/codecov/c/github/nodes-ios/KeyboardHelper.svg)](https://codecov.io/github/nodes-ios/KeyboardHelper) 11 | [![Documentation](https://img.shields.io/cocoapods/metrics/doc-percent/KeyboardHelper.svg)](http://cocoadocs.org/docsets/KeyboardHelper/) 12 | [![CocoaPods](https://img.shields.io/cocoapods/v/KeyboardHelper.svg)](https://cocoapods.org/pods/KeyboardHelper) 13 | [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 14 | ![Swift Package Manager](https://img.shields.io/badge/SPM-compatible-brightgreen.svg) 15 | ![Plaform](https://img.shields.io/badge/platform-iOS-lightgrey.svg) 16 | [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nodes-ios/KeyboardHelper/blob/master/LICENSE) 17 | [![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=https://github.com/nodes-ios/keyboardhelper)](http://clayallsopp.github.io/readme-score?url=https://github.com/nodes-ios/keyboardhelper) 18 | ## 📦 Installation 19 | 20 | ### Carthage 21 | ~~~bash 22 | github "nodes-ios/KeyboardHelper" ~> 3.0.0 23 | ~~~ 24 | 25 | ### CocoaPods 26 | ~~~ 27 | pod 'KeyboardHelper', '~> 3.0.0' 28 | ~~~ 29 | 30 | > ### Older versions 31 | > Last versions compatible with lower Swift versions: 32 | > 33 | > **Swift 4**: `~> 2.0.0` 34 | > **Swift 3**: `== 1.2.1` 35 | > **Swift 2.3**: `== 0.10.0` 36 | > **Swift 2.2**: `== 0.9.4` 37 | 38 | ## 🔧 Setup 39 | Implement `KeyboardHelperDelegate` in your UIViewController. 40 | 41 | ```swift 42 | class ViewController: UIViewController, KeyboardHelperDelegate 43 | ``` 44 | 45 | Add a `KeyboardHelper` private variable, initialize it and set the delegate. 46 | 47 | ```swift 48 | private var keyboardHelper : KeyboardHelper? 49 | 50 | func viewDidLoad() { 51 | ... 52 | self.keyboardHelper = KeyboardHelper(delegate: self) 53 | ... 54 | } 55 | ``` 56 | Implement the two methods in the `KeyboardHelperDelegate`: 57 | 58 | ```swift 59 | public func keyboardWillAppear(_ info: KeyboardHelper.KeyboardAppearanceInfo) 60 | public func keyboardWillDisappear(_ info: KeyboardHelper.KeyboardAppearanceInfo) 61 | ``` 62 | 63 | Both methods take as argument a `KeyboardAppearanceInfo` object, which is basically a wrapper over the `userInfo` dictionary of the `UIKeyboardWillShowNotification` and `UIKeyboardWillHideNotification` notifications. 64 | 65 | One example of implementation for the two delegate methods is: 66 | 67 | ```swift 68 | func keyboardWillAppear(_ info: KeyboardAppearanceInfo) { 69 | UIView.animate(withDuration: TimeInterval(info.animationDuration), 70 | delay: 0, 71 | options: info.animationOptions, 72 | animations: { 73 | let insets = UIEdgeInsetsMake(0, 0, info.endFrame.size.height, 0) 74 | self.scrollView.contentInset = insets 75 | self.scrollView.scrollIndicatorInsets = insets 76 | }, 77 | completion: nil) 78 | } 79 | 80 | func keyboardWillDisappear(_ info: KeyboardAppearanceInfo) { 81 | UIView.animate(withDuration: TimeInterval(info.animationDuration), 82 | delay: 0, 83 | options: info.animationOptions, 84 | animations: { 85 | let insets = UIEdgeInsetsZero 86 | self.scrollView.contentInset = insets 87 | self.scrollView.scrollIndicatorInsets = insets 88 | }, 89 | completion: nil) 90 | } 91 | ``` 92 | 93 | The `KeyboardAppearanceInfo` object has the following properties: 94 | 95 | * `beginFrame`: a `CGRect` corresponding to the value for `UIKeyboardFrameBeginUserInfoKey` 96 | * `endFrame `: a `CGRect` corresponding to the value for `UIKeyboardFrameEndUserInfoKey` 97 | * `belongsToCurrentApp `: a `Bool` corresponding to the value for `UIKeyboardIsLocalUserInfoKey` 98 | * `animationDuration `: a `Double` corresponding to the value for `UIKeyboardAnimationDurationUserInfoKey` 99 | * `animationCurve `: a `UIViewAnimationCurve` corresponding to the value for `UIKeyboardAnimationCurveUserInfoKey` 100 | * `animationOptions `: a `UIViewAnimationOptions ` from the value of `UIKeyboardAnimationCurveUserInfoKey` 101 | 102 | `KeyboardAppearanceInfo` also has the convenience method `animateAlong:completion:`, which can be used like this: 103 | 104 | ```swift 105 | func keyboardWillAppear(info: KeyboardAppearanceInfo) { 106 | info.animateAlong({ () -> Void in 107 | let insets = UIEdgeInsetsMake(0, 0, info.endFrame.size.height, 0) 108 | self.scrollView.contentInset = insets 109 | self.scrollView.scrollIndicatorInsets = insets 110 | }) { finished in } 111 | 112 | ``` 113 | to get the same effect as the initial `keyboardWillAppear:` implementation example above. 114 | 115 | 116 | 117 | ## 👥 Credits 118 | Made with ❤️ at [Nodes](http://nodesagency.com). 119 | 120 | ## 📄 License 121 | **KeyboardHelper** is available under the MIT license. See the [LICENSE](https://github.com/nodes-ios/KeyboardHelper/blob/master/LICENSE) file for more info. 122 | -------------------------------------------------------------------------------- /Example/KeyboardHelperDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Example/KeyboardHelperDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2930691F1C8F0A7700F92F06 /* KeyboardHelper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2930691E1C8F0A7700F92F06 /* KeyboardHelper.framework */; }; 11 | 293069201C8F0A9200F92F06 /* KeyboardHelper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2930691E1C8F0A7700F92F06 /* KeyboardHelper.framework */; }; 12 | 293069211C8F0A9200F92F06 /* KeyboardHelper.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2930691E1C8F0A7700F92F06 /* KeyboardHelper.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 13 | 29F30E6B1C807E2A00C77AF4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29F30E6A1C807E2A00C77AF4 /* AppDelegate.swift */; }; 14 | 29F30E6D1C807E2A00C77AF4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29F30E6C1C807E2A00C77AF4 /* ViewController.swift */; }; 15 | 29F30E701C807E2A00C77AF4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29F30E6E1C807E2A00C77AF4 /* Main.storyboard */; }; 16 | 29F30E721C807E2A00C77AF4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 29F30E711C807E2A00C77AF4 /* Assets.xcassets */; }; 17 | 29F30E751C807E2A00C77AF4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29F30E731C807E2A00C77AF4 /* LaunchScreen.storyboard */; }; 18 | 29F30E7D1C807E3500C77AF4 /* Cartfile in Resources */ = {isa = PBXBuildFile; fileRef = 29F30E7C1C807E3500C77AF4 /* Cartfile */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXCopyFilesBuildPhase section */ 22 | 29F30E821C80829300C77AF4 /* CopyFiles */ = { 23 | isa = PBXCopyFilesBuildPhase; 24 | buildActionMask = 12; 25 | dstPath = ""; 26 | dstSubfolderSpec = 10; 27 | files = ( 28 | 293069211C8F0A9200F92F06 /* KeyboardHelper.framework in CopyFiles */, 29 | ); 30 | runOnlyForDeploymentPostprocessing = 0; 31 | }; 32 | /* End PBXCopyFilesBuildPhase section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 2930691E1C8F0A7700F92F06 /* KeyboardHelper.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = KeyboardHelper.framework; path = Carthage/Build/iOS/KeyboardHelper.framework; sourceTree = SOURCE_ROOT; }; 36 | 29F30E671C807E2A00C77AF4 /* KeyboardHelperDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KeyboardHelperDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 29F30E6A1C807E2A00C77AF4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 38 | 29F30E6C1C807E2A00C77AF4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 39 | 29F30E6F1C807E2A00C77AF4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | 29F30E711C807E2A00C77AF4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 41 | 29F30E741C807E2A00C77AF4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 42 | 29F30E761C807E2A00C77AF4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 29F30E7C1C807E3500C77AF4 /* Cartfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; 44 | /* End PBXFileReference section */ 45 | 46 | /* Begin PBXFrameworksBuildPhase section */ 47 | 29F30E641C807E2A00C77AF4 /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | 2930691F1C8F0A7700F92F06 /* KeyboardHelper.framework in Frameworks */, 52 | 293069201C8F0A9200F92F06 /* KeyboardHelper.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | 29F30E5E1C807E2A00C77AF4 = { 60 | isa = PBXGroup; 61 | children = ( 62 | 29F30E7C1C807E3500C77AF4 /* Cartfile */, 63 | 29F30E691C807E2A00C77AF4 /* KeyboardHelperDemo */, 64 | 29F30E681C807E2A00C77AF4 /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | 29F30E681C807E2A00C77AF4 /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 29F30E671C807E2A00C77AF4 /* KeyboardHelperDemo.app */, 72 | ); 73 | name = Products; 74 | sourceTree = ""; 75 | }; 76 | 29F30E691C807E2A00C77AF4 /* KeyboardHelperDemo */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 29F30E6A1C807E2A00C77AF4 /* AppDelegate.swift */, 80 | 29F30E6C1C807E2A00C77AF4 /* ViewController.swift */, 81 | 29F30E6E1C807E2A00C77AF4 /* Main.storyboard */, 82 | 29F30E711C807E2A00C77AF4 /* Assets.xcassets */, 83 | 29F30E731C807E2A00C77AF4 /* LaunchScreen.storyboard */, 84 | 29F30E761C807E2A00C77AF4 /* Info.plist */, 85 | 29F30E7E1C807F4700C77AF4 /* Frameworks */, 86 | ); 87 | path = KeyboardHelperDemo; 88 | sourceTree = ""; 89 | }; 90 | 29F30E7E1C807F4700C77AF4 /* Frameworks */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 2930691E1C8F0A7700F92F06 /* KeyboardHelper.framework */, 94 | ); 95 | name = Frameworks; 96 | sourceTree = ""; 97 | }; 98 | /* End PBXGroup section */ 99 | 100 | /* Begin PBXNativeTarget section */ 101 | 29F30E661C807E2A00C77AF4 /* KeyboardHelperDemo */ = { 102 | isa = PBXNativeTarget; 103 | buildConfigurationList = 29F30E791C807E2A00C77AF4 /* Build configuration list for PBXNativeTarget "KeyboardHelperDemo" */; 104 | buildPhases = ( 105 | 29F30E631C807E2A00C77AF4 /* Sources */, 106 | 29F30E641C807E2A00C77AF4 /* Frameworks */, 107 | 29F30E651C807E2A00C77AF4 /* Resources */, 108 | 29F30E821C80829300C77AF4 /* CopyFiles */, 109 | ); 110 | buildRules = ( 111 | ); 112 | dependencies = ( 113 | ); 114 | name = KeyboardHelperDemo; 115 | productName = KeyboardHelperDemo; 116 | productReference = 29F30E671C807E2A00C77AF4 /* KeyboardHelperDemo.app */; 117 | productType = "com.apple.product-type.application"; 118 | }; 119 | /* End PBXNativeTarget section */ 120 | 121 | /* Begin PBXProject section */ 122 | 29F30E5F1C807E2A00C77AF4 /* Project object */ = { 123 | isa = PBXProject; 124 | attributes = { 125 | LastSwiftUpdateCheck = 0720; 126 | LastUpgradeCheck = 0720; 127 | ORGANIZATIONNAME = Nodes; 128 | TargetAttributes = { 129 | 29F30E661C807E2A00C77AF4 = { 130 | CreatedOnToolsVersion = 7.2; 131 | LastSwiftMigration = 0810; 132 | }; 133 | }; 134 | }; 135 | buildConfigurationList = 29F30E621C807E2A00C77AF4 /* Build configuration list for PBXProject "KeyboardHelperDemo" */; 136 | compatibilityVersion = "Xcode 3.2"; 137 | developmentRegion = English; 138 | hasScannedForEncodings = 0; 139 | knownRegions = ( 140 | en, 141 | Base, 142 | ); 143 | mainGroup = 29F30E5E1C807E2A00C77AF4; 144 | productRefGroup = 29F30E681C807E2A00C77AF4 /* Products */; 145 | projectDirPath = ""; 146 | projectRoot = ""; 147 | targets = ( 148 | 29F30E661C807E2A00C77AF4 /* KeyboardHelperDemo */, 149 | ); 150 | }; 151 | /* End PBXProject section */ 152 | 153 | /* Begin PBXResourcesBuildPhase section */ 154 | 29F30E651C807E2A00C77AF4 /* Resources */ = { 155 | isa = PBXResourcesBuildPhase; 156 | buildActionMask = 2147483647; 157 | files = ( 158 | 29F30E751C807E2A00C77AF4 /* LaunchScreen.storyboard in Resources */, 159 | 29F30E721C807E2A00C77AF4 /* Assets.xcassets in Resources */, 160 | 29F30E7D1C807E3500C77AF4 /* Cartfile in Resources */, 161 | 29F30E701C807E2A00C77AF4 /* Main.storyboard in Resources */, 162 | ); 163 | runOnlyForDeploymentPostprocessing = 0; 164 | }; 165 | /* End PBXResourcesBuildPhase section */ 166 | 167 | /* Begin PBXSourcesBuildPhase section */ 168 | 29F30E631C807E2A00C77AF4 /* Sources */ = { 169 | isa = PBXSourcesBuildPhase; 170 | buildActionMask = 2147483647; 171 | files = ( 172 | 29F30E6D1C807E2A00C77AF4 /* ViewController.swift in Sources */, 173 | 29F30E6B1C807E2A00C77AF4 /* AppDelegate.swift in Sources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXSourcesBuildPhase section */ 178 | 179 | /* Begin PBXVariantGroup section */ 180 | 29F30E6E1C807E2A00C77AF4 /* Main.storyboard */ = { 181 | isa = PBXVariantGroup; 182 | children = ( 183 | 29F30E6F1C807E2A00C77AF4 /* Base */, 184 | ); 185 | name = Main.storyboard; 186 | sourceTree = ""; 187 | }; 188 | 29F30E731C807E2A00C77AF4 /* LaunchScreen.storyboard */ = { 189 | isa = PBXVariantGroup; 190 | children = ( 191 | 29F30E741C807E2A00C77AF4 /* Base */, 192 | ); 193 | name = LaunchScreen.storyboard; 194 | sourceTree = ""; 195 | }; 196 | /* End PBXVariantGroup section */ 197 | 198 | /* Begin XCBuildConfiguration section */ 199 | 29F30E771C807E2A00C77AF4 /* Debug */ = { 200 | isa = XCBuildConfiguration; 201 | buildSettings = { 202 | ALWAYS_SEARCH_USER_PATHS = NO; 203 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 204 | CLANG_CXX_LIBRARY = "libc++"; 205 | CLANG_ENABLE_MODULES = YES; 206 | CLANG_ENABLE_OBJC_ARC = YES; 207 | CLANG_WARN_BOOL_CONVERSION = YES; 208 | CLANG_WARN_CONSTANT_CONVERSION = YES; 209 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 210 | CLANG_WARN_EMPTY_BODY = YES; 211 | CLANG_WARN_ENUM_CONVERSION = YES; 212 | CLANG_WARN_INT_CONVERSION = YES; 213 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 214 | CLANG_WARN_UNREACHABLE_CODE = YES; 215 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 216 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 217 | COPY_PHASE_STRIP = NO; 218 | DEBUG_INFORMATION_FORMAT = dwarf; 219 | ENABLE_STRICT_OBJC_MSGSEND = YES; 220 | ENABLE_TESTABILITY = YES; 221 | GCC_C_LANGUAGE_STANDARD = gnu99; 222 | GCC_DYNAMIC_NO_PIC = NO; 223 | GCC_NO_COMMON_BLOCKS = YES; 224 | GCC_OPTIMIZATION_LEVEL = 0; 225 | GCC_PREPROCESSOR_DEFINITIONS = ( 226 | "DEBUG=1", 227 | "$(inherited)", 228 | ); 229 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 230 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 231 | GCC_WARN_UNDECLARED_SELECTOR = YES; 232 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 233 | GCC_WARN_UNUSED_FUNCTION = YES; 234 | GCC_WARN_UNUSED_VARIABLE = YES; 235 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 236 | MTL_ENABLE_DEBUG_INFO = YES; 237 | ONLY_ACTIVE_ARCH = YES; 238 | SDKROOT = iphoneos; 239 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 240 | }; 241 | name = Debug; 242 | }; 243 | 29F30E781C807E2A00C77AF4 /* Release */ = { 244 | isa = XCBuildConfiguration; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_BOOL_CONVERSION = YES; 252 | CLANG_WARN_CONSTANT_CONVERSION = YES; 253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 254 | CLANG_WARN_EMPTY_BODY = YES; 255 | CLANG_WARN_ENUM_CONVERSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 258 | CLANG_WARN_UNREACHABLE_CODE = YES; 259 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 260 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 261 | COPY_PHASE_STRIP = NO; 262 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 263 | ENABLE_NS_ASSERTIONS = NO; 264 | ENABLE_STRICT_OBJC_MSGSEND = YES; 265 | GCC_C_LANGUAGE_STANDARD = gnu99; 266 | GCC_NO_COMMON_BLOCKS = YES; 267 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 268 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 269 | GCC_WARN_UNDECLARED_SELECTOR = YES; 270 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 271 | GCC_WARN_UNUSED_FUNCTION = YES; 272 | GCC_WARN_UNUSED_VARIABLE = YES; 273 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 274 | MTL_ENABLE_DEBUG_INFO = NO; 275 | SDKROOT = iphoneos; 276 | VALIDATE_PRODUCT = YES; 277 | }; 278 | name = Release; 279 | }; 280 | 29F30E7A1C807E2A00C77AF4 /* Debug */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 284 | FRAMEWORK_SEARCH_PATHS = ( 285 | "$(inherited)", 286 | "$(PROJECT_DIR)/KeyboardHelperDemo", 287 | "$(PROJECT_DIR)/Carthage/Build/iOS", 288 | ); 289 | INFOPLIST_FILE = KeyboardHelperDemo/Info.plist; 290 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 291 | PRODUCT_BUNDLE_IDENTIFIER = dk.nodes.KeyboardHelperDemo; 292 | PRODUCT_NAME = "$(TARGET_NAME)"; 293 | SWIFT_VERSION = 3.0; 294 | }; 295 | name = Debug; 296 | }; 297 | 29F30E7B1C807E2A00C77AF4 /* Release */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 301 | FRAMEWORK_SEARCH_PATHS = ( 302 | "$(inherited)", 303 | "$(PROJECT_DIR)/KeyboardHelperDemo", 304 | "$(PROJECT_DIR)/Carthage/Build/iOS", 305 | ); 306 | INFOPLIST_FILE = KeyboardHelperDemo/Info.plist; 307 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 308 | PRODUCT_BUNDLE_IDENTIFIER = dk.nodes.KeyboardHelperDemo; 309 | PRODUCT_NAME = "$(TARGET_NAME)"; 310 | SWIFT_VERSION = 3.0; 311 | }; 312 | name = Release; 313 | }; 314 | /* End XCBuildConfiguration section */ 315 | 316 | /* Begin XCConfigurationList section */ 317 | 29F30E621C807E2A00C77AF4 /* Build configuration list for PBXProject "KeyboardHelperDemo" */ = { 318 | isa = XCConfigurationList; 319 | buildConfigurations = ( 320 | 29F30E771C807E2A00C77AF4 /* Debug */, 321 | 29F30E781C807E2A00C77AF4 /* Release */, 322 | ); 323 | defaultConfigurationIsVisible = 0; 324 | defaultConfigurationName = Release; 325 | }; 326 | 29F30E791C807E2A00C77AF4 /* Build configuration list for PBXNativeTarget "KeyboardHelperDemo" */ = { 327 | isa = XCConfigurationList; 328 | buildConfigurations = ( 329 | 29F30E7A1C807E2A00C77AF4 /* Debug */, 330 | 29F30E7B1C807E2A00C77AF4 /* Release */, 331 | ); 332 | defaultConfigurationIsVisible = 0; 333 | defaultConfigurationName = Release; 334 | }; 335 | /* End XCConfigurationList section */ 336 | }; 337 | rootObject = 29F30E5F1C807E2A00C77AF4 /* Project object */; 338 | } 339 | -------------------------------------------------------------------------------- /KeyboardHelper.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 275BCA821C57C9F800FF3647 /* KeyboardHelper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 275BCA771C57C9F800FF3647 /* KeyboardHelper.framework */; }; 11 | 82B793861C6495D000AB8A48 /* KeyboardAppearanceInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B793811C6495D000AB8A48 /* KeyboardAppearanceInfo.swift */; }; 12 | 82B793871C6495D000AB8A48 /* KeyboardHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B793821C6495D000AB8A48 /* KeyboardHelper.swift */; }; 13 | 82B793891C6495D000AB8A48 /* KeyboardHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 82B793851C6495D000AB8A48 /* KeyboardHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 82B793941C64996E00AB8A48 /* KeyboardAppearanceInfoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B793911C64996E00AB8A48 /* KeyboardAppearanceInfoTests.swift */; }; 15 | 82B793951C64996E00AB8A48 /* KeyboardHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B793921C64996E00AB8A48 /* KeyboardHelperTests.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | 275BCA831C57C9F800FF3647 /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = 275BCA6E1C57C9F800FF3647 /* Project object */; 22 | proxyType = 1; 23 | remoteGlobalIDString = 275BCA761C57C9F800FF3647; 24 | remoteInfo = KeyboardHelper; 25 | }; 26 | /* End PBXContainerItemProxy section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 275BCA771C57C9F800FF3647 /* KeyboardHelper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = KeyboardHelper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 275BCA811C57C9F800FF3647 /* KeyboardHelperTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KeyboardHelperTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 82B793811C6495D000AB8A48 /* KeyboardAppearanceInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardAppearanceInfo.swift; sourceTree = ""; }; 32 | 82B793821C6495D000AB8A48 /* KeyboardHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardHelper.swift; sourceTree = ""; }; 33 | 82B793841C6495D000AB8A48 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | 82B793851C6495D000AB8A48 /* KeyboardHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyboardHelper.h; sourceTree = ""; }; 35 | 82B7938F1C64996E00AB8A48 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | 82B793911C64996E00AB8A48 /* KeyboardAppearanceInfoTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardAppearanceInfoTests.swift; sourceTree = ""; }; 37 | 82B793921C64996E00AB8A48 /* KeyboardHelperTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardHelperTests.swift; sourceTree = ""; }; 38 | B46CCB632289A25500F801CD /* KeyboardHelper.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = KeyboardHelper.podspec; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | 275BCA731C57C9F800FF3647 /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | ); 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | 275BCA7E1C57C9F800FF3647 /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | 275BCA821C57C9F800FF3647 /* KeyboardHelper.framework in Frameworks */, 54 | ); 55 | runOnlyForDeploymentPostprocessing = 0; 56 | }; 57 | /* End PBXFrameworksBuildPhase section */ 58 | 59 | /* Begin PBXGroup section */ 60 | 275BCA6D1C57C9F800FF3647 = { 61 | isa = PBXGroup; 62 | children = ( 63 | B46CCB632289A25500F801CD /* KeyboardHelper.podspec */, 64 | 275BCA791C57C9F800FF3647 /* KeyboardHelper */, 65 | 275BCA851C57C9F800FF3647 /* KeyboardHelperTests */, 66 | 275BCA781C57C9F800FF3647 /* Products */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | 275BCA781C57C9F800FF3647 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 275BCA771C57C9F800FF3647 /* KeyboardHelper.framework */, 74 | 275BCA811C57C9F800FF3647 /* KeyboardHelperTests.xctest */, 75 | ); 76 | name = Products; 77 | sourceTree = ""; 78 | }; 79 | 275BCA791C57C9F800FF3647 /* KeyboardHelper */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 82B793801C6495D000AB8A48 /* Classes */, 83 | 82B793831C6495D000AB8A48 /* Supporting Files */, 84 | ); 85 | path = KeyboardHelper; 86 | sourceTree = ""; 87 | }; 88 | 275BCA851C57C9F800FF3647 /* KeyboardHelperTests */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 82B793901C64996E00AB8A48 /* Tests */, 92 | 82B7938E1C64996E00AB8A48 /* Supporting Files */, 93 | ); 94 | path = KeyboardHelperTests; 95 | sourceTree = ""; 96 | }; 97 | 82B793801C6495D000AB8A48 /* Classes */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 82B793811C6495D000AB8A48 /* KeyboardAppearanceInfo.swift */, 101 | 82B793821C6495D000AB8A48 /* KeyboardHelper.swift */, 102 | ); 103 | path = Classes; 104 | sourceTree = ""; 105 | }; 106 | 82B793831C6495D000AB8A48 /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 82B793841C6495D000AB8A48 /* Info.plist */, 110 | 82B793851C6495D000AB8A48 /* KeyboardHelper.h */, 111 | ); 112 | path = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | 82B7938E1C64996E00AB8A48 /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 82B7938F1C64996E00AB8A48 /* Info.plist */, 119 | ); 120 | path = "Supporting Files"; 121 | sourceTree = ""; 122 | }; 123 | 82B793901C64996E00AB8A48 /* Tests */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 82B793911C64996E00AB8A48 /* KeyboardAppearanceInfoTests.swift */, 127 | 82B793921C64996E00AB8A48 /* KeyboardHelperTests.swift */, 128 | ); 129 | path = Tests; 130 | sourceTree = ""; 131 | }; 132 | /* End PBXGroup section */ 133 | 134 | /* Begin PBXHeadersBuildPhase section */ 135 | 275BCA741C57C9F800FF3647 /* Headers */ = { 136 | isa = PBXHeadersBuildPhase; 137 | buildActionMask = 2147483647; 138 | files = ( 139 | 82B793891C6495D000AB8A48 /* KeyboardHelper.h in Headers */, 140 | ); 141 | runOnlyForDeploymentPostprocessing = 0; 142 | }; 143 | /* End PBXHeadersBuildPhase section */ 144 | 145 | /* Begin PBXNativeTarget section */ 146 | 275BCA761C57C9F800FF3647 /* KeyboardHelper */ = { 147 | isa = PBXNativeTarget; 148 | buildConfigurationList = 275BCA8B1C57C9F800FF3647 /* Build configuration list for PBXNativeTarget "KeyboardHelper" */; 149 | buildPhases = ( 150 | 275BCA721C57C9F800FF3647 /* Sources */, 151 | 275BCA731C57C9F800FF3647 /* Frameworks */, 152 | 275BCA741C57C9F800FF3647 /* Headers */, 153 | 275BCA751C57C9F800FF3647 /* Resources */, 154 | ); 155 | buildRules = ( 156 | ); 157 | dependencies = ( 158 | ); 159 | name = KeyboardHelper; 160 | productName = KeyboardHelper; 161 | productReference = 275BCA771C57C9F800FF3647 /* KeyboardHelper.framework */; 162 | productType = "com.apple.product-type.framework"; 163 | }; 164 | 275BCA801C57C9F800FF3647 /* KeyboardHelperTests */ = { 165 | isa = PBXNativeTarget; 166 | buildConfigurationList = 275BCA8E1C57C9F800FF3647 /* Build configuration list for PBXNativeTarget "KeyboardHelperTests" */; 167 | buildPhases = ( 168 | 275BCA7D1C57C9F800FF3647 /* Sources */, 169 | 275BCA7E1C57C9F800FF3647 /* Frameworks */, 170 | 275BCA7F1C57C9F800FF3647 /* Resources */, 171 | ); 172 | buildRules = ( 173 | ); 174 | dependencies = ( 175 | 275BCA841C57C9F800FF3647 /* PBXTargetDependency */, 176 | ); 177 | name = KeyboardHelperTests; 178 | productName = KeyboardHelperTests; 179 | productReference = 275BCA811C57C9F800FF3647 /* KeyboardHelperTests.xctest */; 180 | productType = "com.apple.product-type.bundle.unit-test"; 181 | }; 182 | /* End PBXNativeTarget section */ 183 | 184 | /* Begin PBXProject section */ 185 | 275BCA6E1C57C9F800FF3647 /* Project object */ = { 186 | isa = PBXProject; 187 | attributes = { 188 | LastSwiftUpdateCheck = 0720; 189 | LastUpgradeCheck = 1020; 190 | ORGANIZATIONNAME = Nodes; 191 | TargetAttributes = { 192 | 275BCA761C57C9F800FF3647 = { 193 | CreatedOnToolsVersion = 7.2; 194 | LastSwiftMigration = 1020; 195 | }; 196 | 275BCA801C57C9F800FF3647 = { 197 | CreatedOnToolsVersion = 7.2; 198 | LastSwiftMigration = 1020; 199 | }; 200 | }; 201 | }; 202 | buildConfigurationList = 275BCA711C57C9F800FF3647 /* Build configuration list for PBXProject "KeyboardHelper" */; 203 | compatibilityVersion = "Xcode 3.2"; 204 | developmentRegion = en; 205 | hasScannedForEncodings = 0; 206 | knownRegions = ( 207 | en, 208 | Base, 209 | ); 210 | mainGroup = 275BCA6D1C57C9F800FF3647; 211 | productRefGroup = 275BCA781C57C9F800FF3647 /* Products */; 212 | projectDirPath = ""; 213 | projectRoot = ""; 214 | targets = ( 215 | 275BCA761C57C9F800FF3647 /* KeyboardHelper */, 216 | 275BCA801C57C9F800FF3647 /* KeyboardHelperTests */, 217 | ); 218 | }; 219 | /* End PBXProject section */ 220 | 221 | /* Begin PBXResourcesBuildPhase section */ 222 | 275BCA751C57C9F800FF3647 /* Resources */ = { 223 | isa = PBXResourcesBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | }; 229 | 275BCA7F1C57C9F800FF3647 /* Resources */ = { 230 | isa = PBXResourcesBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | /* End PBXResourcesBuildPhase section */ 237 | 238 | /* Begin PBXSourcesBuildPhase section */ 239 | 275BCA721C57C9F800FF3647 /* Sources */ = { 240 | isa = PBXSourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | 82B793871C6495D000AB8A48 /* KeyboardHelper.swift in Sources */, 244 | 82B793861C6495D000AB8A48 /* KeyboardAppearanceInfo.swift in Sources */, 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | 275BCA7D1C57C9F800FF3647 /* Sources */ = { 249 | isa = PBXSourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 82B793951C64996E00AB8A48 /* KeyboardHelperTests.swift in Sources */, 253 | 82B793941C64996E00AB8A48 /* KeyboardAppearanceInfoTests.swift in Sources */, 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | }; 257 | /* End PBXSourcesBuildPhase section */ 258 | 259 | /* Begin PBXTargetDependency section */ 260 | 275BCA841C57C9F800FF3647 /* PBXTargetDependency */ = { 261 | isa = PBXTargetDependency; 262 | target = 275BCA761C57C9F800FF3647 /* KeyboardHelper */; 263 | targetProxy = 275BCA831C57C9F800FF3647 /* PBXContainerItemProxy */; 264 | }; 265 | /* End PBXTargetDependency section */ 266 | 267 | /* Begin XCBuildConfiguration section */ 268 | 275BCA891C57C9F800FF3647 /* Debug */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | ALWAYS_SEARCH_USER_PATHS = NO; 272 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 273 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 274 | CLANG_CXX_LIBRARY = "libc++"; 275 | CLANG_ENABLE_MODULES = YES; 276 | CLANG_ENABLE_OBJC_ARC = YES; 277 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 278 | CLANG_WARN_BOOL_CONVERSION = YES; 279 | CLANG_WARN_COMMA = YES; 280 | CLANG_WARN_CONSTANT_CONVERSION = YES; 281 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 282 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 283 | CLANG_WARN_EMPTY_BODY = YES; 284 | CLANG_WARN_ENUM_CONVERSION = YES; 285 | CLANG_WARN_INFINITE_RECURSION = YES; 286 | CLANG_WARN_INT_CONVERSION = YES; 287 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 288 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 289 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 290 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 291 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 292 | CLANG_WARN_STRICT_PROTOTYPES = YES; 293 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 294 | CLANG_WARN_UNREACHABLE_CODE = YES; 295 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 296 | COPY_PHASE_STRIP = NO; 297 | CURRENT_PROJECT_VERSION = 1; 298 | DEBUG_INFORMATION_FORMAT = dwarf; 299 | ENABLE_STRICT_OBJC_MSGSEND = YES; 300 | ENABLE_TESTABILITY = YES; 301 | GCC_C_LANGUAGE_STANDARD = gnu99; 302 | GCC_DYNAMIC_NO_PIC = NO; 303 | GCC_NO_COMMON_BLOCKS = YES; 304 | GCC_OPTIMIZATION_LEVEL = 0; 305 | GCC_PREPROCESSOR_DEFINITIONS = ( 306 | "DEBUG=1", 307 | "$(inherited)", 308 | ); 309 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 310 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 311 | GCC_WARN_UNDECLARED_SELECTOR = YES; 312 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 313 | GCC_WARN_UNUSED_FUNCTION = YES; 314 | GCC_WARN_UNUSED_VARIABLE = YES; 315 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 316 | MTL_ENABLE_DEBUG_INFO = YES; 317 | ONLY_ACTIVE_ARCH = YES; 318 | SDKROOT = iphoneos; 319 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 320 | TARGETED_DEVICE_FAMILY = "1,2"; 321 | VERSIONING_SYSTEM = "apple-generic"; 322 | VERSION_INFO_PREFIX = ""; 323 | }; 324 | name = Debug; 325 | }; 326 | 275BCA8A1C57C9F800FF3647 /* Release */ = { 327 | isa = XCBuildConfiguration; 328 | buildSettings = { 329 | ALWAYS_SEARCH_USER_PATHS = NO; 330 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 331 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 332 | CLANG_CXX_LIBRARY = "libc++"; 333 | CLANG_ENABLE_MODULES = YES; 334 | CLANG_ENABLE_OBJC_ARC = YES; 335 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_COMMA = YES; 338 | CLANG_WARN_CONSTANT_CONVERSION = YES; 339 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 341 | CLANG_WARN_EMPTY_BODY = YES; 342 | CLANG_WARN_ENUM_CONVERSION = YES; 343 | CLANG_WARN_INFINITE_RECURSION = YES; 344 | CLANG_WARN_INT_CONVERSION = YES; 345 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 346 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 347 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 348 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 349 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 350 | CLANG_WARN_STRICT_PROTOTYPES = YES; 351 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 352 | CLANG_WARN_UNREACHABLE_CODE = YES; 353 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 354 | COPY_PHASE_STRIP = NO; 355 | CURRENT_PROJECT_VERSION = 1; 356 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 357 | ENABLE_NS_ASSERTIONS = NO; 358 | ENABLE_STRICT_OBJC_MSGSEND = YES; 359 | GCC_C_LANGUAGE_STANDARD = gnu99; 360 | GCC_NO_COMMON_BLOCKS = YES; 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 368 | MTL_ENABLE_DEBUG_INFO = NO; 369 | SDKROOT = iphoneos; 370 | TARGETED_DEVICE_FAMILY = "1,2"; 371 | VALIDATE_PRODUCT = YES; 372 | VERSIONING_SYSTEM = "apple-generic"; 373 | VERSION_INFO_PREFIX = ""; 374 | }; 375 | name = Release; 376 | }; 377 | 275BCA8C1C57C9F800FF3647 /* Debug */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | DEFINES_MODULE = YES; 381 | DYLIB_COMPATIBILITY_VERSION = 1; 382 | DYLIB_CURRENT_VERSION = 1; 383 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 384 | INFOPLIST_FILE = "$(SRCROOT)/KeyboardHelper/Supporting Files/Info.plist"; 385 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 386 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 387 | PRODUCT_BUNDLE_IDENTIFIER = com.nodes.KeyboardHelper; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | SKIP_INSTALL = YES; 390 | SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h"; 391 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 392 | SWIFT_VERSION = 5.0; 393 | }; 394 | name = Debug; 395 | }; 396 | 275BCA8D1C57C9F800FF3647 /* Release */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | DEFINES_MODULE = YES; 400 | DYLIB_COMPATIBILITY_VERSION = 1; 401 | DYLIB_CURRENT_VERSION = 1; 402 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 403 | INFOPLIST_FILE = "$(SRCROOT)/KeyboardHelper/Supporting Files/Info.plist"; 404 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 405 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 406 | PRODUCT_BUNDLE_IDENTIFIER = com.nodes.KeyboardHelper; 407 | PRODUCT_NAME = "$(TARGET_NAME)"; 408 | SKIP_INSTALL = YES; 409 | SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h"; 410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 411 | SWIFT_VERSION = 5.0; 412 | }; 413 | name = Release; 414 | }; 415 | 275BCA8F1C57C9F800FF3647 /* Debug */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | INFOPLIST_FILE = "KeyboardHelperTests/Supporting Files/Info.plist"; 419 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 420 | PRODUCT_BUNDLE_IDENTIFIER = com.nodes.KeyboardHelperTests; 421 | PRODUCT_NAME = "$(TARGET_NAME)"; 422 | SWIFT_VERSION = 5.0; 423 | }; 424 | name = Debug; 425 | }; 426 | 275BCA901C57C9F800FF3647 /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | INFOPLIST_FILE = "KeyboardHelperTests/Supporting Files/Info.plist"; 430 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 431 | PRODUCT_BUNDLE_IDENTIFIER = com.nodes.KeyboardHelperTests; 432 | PRODUCT_NAME = "$(TARGET_NAME)"; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | SWIFT_VERSION = 5.0; 435 | }; 436 | name = Release; 437 | }; 438 | /* End XCBuildConfiguration section */ 439 | 440 | /* Begin XCConfigurationList section */ 441 | 275BCA711C57C9F800FF3647 /* Build configuration list for PBXProject "KeyboardHelper" */ = { 442 | isa = XCConfigurationList; 443 | buildConfigurations = ( 444 | 275BCA891C57C9F800FF3647 /* Debug */, 445 | 275BCA8A1C57C9F800FF3647 /* Release */, 446 | ); 447 | defaultConfigurationIsVisible = 0; 448 | defaultConfigurationName = Release; 449 | }; 450 | 275BCA8B1C57C9F800FF3647 /* Build configuration list for PBXNativeTarget "KeyboardHelper" */ = { 451 | isa = XCConfigurationList; 452 | buildConfigurations = ( 453 | 275BCA8C1C57C9F800FF3647 /* Debug */, 454 | 275BCA8D1C57C9F800FF3647 /* Release */, 455 | ); 456 | defaultConfigurationIsVisible = 0; 457 | defaultConfigurationName = Release; 458 | }; 459 | 275BCA8E1C57C9F800FF3647 /* Build configuration list for PBXNativeTarget "KeyboardHelperTests" */ = { 460 | isa = XCConfigurationList; 461 | buildConfigurations = ( 462 | 275BCA8F1C57C9F800FF3647 /* Debug */, 463 | 275BCA901C57C9F800FF3647 /* Release */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 275BCA6E1C57C9F800FF3647 /* Project object */; 471 | } 472 | --------------------------------------------------------------------------------