Git Product home page Git Product logo

keynode's Introduction

Keynode

Carthage compatible Version License Platform

  • textfield example

textfield

  • textview example

textview

  • change the scroll range at the time of the keyboard display.
  • You can perform interactive keyboard display switch.
  • You can easily perform the switching of the display to match the height of the keyboard.

How to Install Keynode

iOS 8+

Cocoapods

Add the following to your Podfile:

pod "Keynode"
use_frameworks!

Note: the use_frameworks! is required for pods made in Swift.

Carthage

Add the following to your Cartfile:

github "KyoheiG3/Keynode"

iOS 7

Just add everything in the Keynode.swift file to your project.

Usage

import

  • import the Keynode.
import Keynode

Handler

var willAnimationHandler: ((show: Bool, rect: CGRect) -> Void)?
  • Set the method to be called just before the animation.
var animationsHandler: ((show: Bool, rect: CGRect) -> Void)?
  • Set the method to be called when the display switching animation.
  • It is also known at the time of the keyboard operation of the scroll gesture.
var completionHandler: ((show: Bool, responder: UIResponder?, keyboard: UIView?) -> Void)?
  • Set the method to be called at the end animation.

Variable

var gesturePanning: Bool
  • true is lose the keyboard at scroll gesture.
  • Default is true.
var autoScrollInset: Bool
  • true is automatically set the height of the UIScrollView contentInset.bottom of keyboard when open.
  • view of target is the initialization of the argument of Connector.
  • Default is true.
var defaultInsetBottom: CGFloat
  • autoScrollInset specify the Inset.bottom of the case of true.
  • Default is 0
var gestureOffset: CGFloat
  • Such as when there is a toolbar, you can specify the offset of when closing the keyboard with scroll gesture.
  • If the value is not set, the value specified in the defaultInsetBottom will be used.
// global
let UIResponderFirstResponderNotification: String
  • Notification name for first responder.
// global
let UIResponderFirstResponderUserInfoKey: String
  • Notification user info key for first responder.

Function

func setResponder(responder: UIResponder)
  • Can set own responder.

Extension

// UIApplication
func needNotificationForFirstResponder(from: AnyObject?)
  • UIResponderFirstResponderNotification notification by first responder.

Caution

  • Obtain the inputAccessoryView of superview and has been operating the keyboard, you might not work if the specification has been changed, but it will be addressed in the earliest possible stage.
  • iOS7.0 ~ iOS9.0 is confirmed operation.

Acknowledgements

LICENSE

Under the MIT license. See LICENSE file for details.

keynode's People

Contributors

kyoheig3 avatar wm-j-ray avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.