Coder Social home page Coder Social logo

bonyadmitr / keyboardhidemanager Goto Github PK

View Code? Open in Web Editor NEW
57.0 5.0 8.0 319 KB

Codeless manager to hide keyboard by tapping on views for iOS written in Swift

License: MIT License

Swift 87.44% Ruby 6.64% Objective-C 5.91%
cocoapods codeless swift keyboard ios touch swift-3 swift3 framework library

keyboardhidemanager's Introduction

KeyboardHideManager

Icon

Language CocoaPods Compatible Platform License Awesome-ios Awesome-swift Awesome

KeyboardHideManager - codeless manager to hide keyboard by tapping on views for iOS written in Swift.

preview

Structure

Features

  • 3 simple actions to setup
  • Multiple views setup
  • Codeless usage
  • Xib support

Requirements

  • Swift 3.0+
  • iOS 8.0+

Installation

CocoaPods

pod 'KeyboardHideManager', '~> 1.0'
Full CocoaPods Guide (click to expand)

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate KeyboardHideManager into your Xcode project using CocoaPods, create file Podfile with content:

platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'KeyboardHideManager', '~> 1.0'
end

Then, run the following command:

$ pod install

Close 'Your Target Name'.xcodeproj and open 'Your Target Name'.xcworkspace.

Carthage (not supported)

KeyboardHideManager cannot be used with Carthage in IB due .framework issue. Use CocoaPods or Manual install.

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate KeyboardHideManager into your project manually.

Drag KeyboardHideManager folder in your project.

Usage

    1. Drag Object from Object library

usage_1

    1. Setup KeyboardHideManager in Class field

usage_2

    1. Connect views with targets

usage_3

User Iteraction Enabled

Target must be UIView subclass and user iteraction enabled is on. You can set it in IB in View section: (example for UILabel)

user_iteraction_enabled

or in code:

someView.isUserInteractionEnabled = true

Xib support

To use with xib you must add strong property to controller:

@IBOutlet var keyboardHideManager: KeyboardHideManager!

Otherwise it will be deinited. It is logic of Objects in xibs.

To do

  • Add example
  • Add tests
  • Add comments
  • Add CI

License

KeyboardHideManager is released under the MIT license. See LICENSE for details.

keyboardhidemanager's People

Contributors

anishroff avatar bonyadmitr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

keyboardhidemanager's Issues

great idea, currently it dies ;(

hey, testing the repo, but it fails in the simplest of cases, hooking to a UIView, in latest bits of Xcode:

"..<UICustomObject 0x170011580> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key targets. ..."

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.