GithubHelp home page GithubHelp logo

gwangpa / jcdialpad Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jconst/jcdialpad

0.0 2.0 0.0 2.64 MB

A customizable phone dial pad view similar to the iOS 7 Phone app's Keypad view.

License: MIT License

Ruby 3.25% Objective-C 96.75%

jcdialpad's Introduction

JCDialPad

JCDialPad is a customizable view which allows you to create button menus in the style of the iOS 7/8 keypad and pin pad views. Here are some examples of views created using JCDialPad:

   

Features

  • Fully customizable buttons with useful defaults
  • Automatically format phone numbers as you type with any region supported by libPhoneNumber
  • Set a background image with a frosted overlay
  • Handle button presses (both long and short) in multiple different ways using two simple delegate methods
  • Buttons are automatically laid out in centered rows of three
  • Most colors and fonts can be customized using UIAppearance, or set directly
  • Scales properly on all device sizes including iPad

Installation

CocoaPods is the easiest way to manage your iOS/OSX dependencies. Check out their getting started guide to see how to set it up. Once you do, simply add this line to your podfile:

pod "JCDialPad"

Usage

Creating a standard keypad view with buttons 1-9, *, and # is as simple as this:

JCDialPad *pad = [[JCDialPad alloc] initWithFrame:self.view.bounds];
pad.buttons = [JCDialPad defaultButtons];
pad.delegate = self;
[self.view addSubview:pad];

Check out the Demo project to get a sense of how to create more complex views, add a background image, and create your own buttons using images or iconic fonts.

Customising the Appearance

Most colours and fonts used within the module can be set using the UIAppearance proxy. The example project shows how to do this, but for a more in depth look at UIAppearance check out the docs check out the docs or check out Matt Thompson’s article on NSHipster.

Known Issues

  • Crazy stuff happens in landscape mode.
  • Buttons just start to run off the screen if you add too many. Not sure what the best choice would be to do in this case.
  • I would really like to get the actual iOS 7 phone keypad visual styling – where the frosted overlay is white, and pressing the buttons actually makes them become more translucent, revealing the colors of the background image.

License

JCDialPad is available under the MIT license. See the LICENSE file for more info.

jcdialpad's People

Contributors

abury avatar jconst avatar andreacremaschi avatar gwangpa avatar djbe avatar chocochipset avatar italypaleale avatar vladzz avatar leonatan avatar wolffan avatar sdrew 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.