Skip to content

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

License

Notifications You must be signed in to change notification settings

jconst/JCDialPad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

   

Note: If you're looking for more than just the UI elements and want a full VoIP phone inside your iOS app, check out my other library PhoneKit!

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published