Giter VIP home page Giter VIP logo

slidden's Introduction

Slidden: An open source, customizable, iOS 8 keyboard written in Swift.

Slidden is an open source, customizable, iOS 8 keyboard, written in Swift. iOS 8 brought us the ability to create fully customizable keyboards, but does not provide a strong foundation to start from. Slidden aims to remedy that by providing an easy way to get started making your own iOS keyboards.

Slidden is named after the Sholes and Glidden typewriter, the first commercially successful typewriter and the origin of the QWERTY keyboard.

Features

Planned for 1.0 Release

  • Multiple states (Shift, numbers/symbols, etc.)
  • Full default English keyboard
  • Delegate

Notice

Slidden is in its early stages of life. Code will change dramatically between updates. Please consider contributing your ideas if you think something is missing!

Requirements

  • Xcode 6
  • iOS 8.0+

Installation

At the current moment, the best installation method is to add Slidden as a git submodule and add Slidden.framework to your list of Target Dependencies. Don't forget to add Slidden.framework to your keyboard's list of target dependencies as well!


Usage

Simple

If you subclass Slidden.KeyboardViewController, you get a KeyboardView and nice autolayout constraints right out of the box. Subclassing is as easy as:

class KeyboardViewController: Slidden.KeyboardViewController {
    override func viewDidLoad() {
        super.viewDidLoad()

        // Add the keys we need to the keyboard
        setupKeys()
    }

Add keys to the keyboard.

func setupKeys() {
        let helloKey = KeyboardKeyView(type: .Character, keyCap: "Hello", outputText: "Hello")
        helloKey.textColor = UIColor.whiteColor()
        helloKey.color = UIColor.blueColor()
        self.keyboardView.addKey(helloKey, row: 0)
        
        let worldKey = KeyboardKeyView(type: .Character, keyCap: "World", outputText: "World")
        worldKey.textColor = UIColor.whiteColor()
        worldKey.color = UIColor.redColor()
        self.keyboardView.addKey(worldKey, row: 0)
}

Add images to your keys.

func setupKeys() {
	let shiftKey = KeyboardKeyView(type: .Shift, keyCap:"", outputText: "")
    let img = UIImage(named:"Shift")
    shiftKey.image = img
    shiftKey.imageView.contentMode = .Center
}

If you want your image to be the same color as your other keys' text, you can use shouldColorImage to have CoreGraphics redraw the image of your key with the uniform color.

func setupKeys() {
	let shiftKey = KeyboardKeyView(type: .Shift, keyCap:"", outputText: "")
    let img = UIImage(named:"Shift")
    
    shiftKey.image = img
    shiftKey.imageView.contentMode = .Center
    
    shiftKey.color = UIColor.blueColor()
    shiftKey.selectedColor = UIColor.darkerBlueColor()
    shiftKey.textColor = UIColor.whiteColor()
    shiftKey.shouldColorImage = true // Will redraw the Shift image to match `textColor`
}

Complex

More Coming Soon

Examples

Screenshot of example app

Creator

License

Slidden is released under an MIT license. See LICENSE for more information.

slidden's People

Contributors

brimizer avatar grachyov avatar

Watchers

Chew Chit Siang avatar James Cloos avatar  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.