创建类似于iOS 7/8键盘风格的按纽菜单:JCDialPad

jopen 10年前

JCDialPad是一个可定制视图,它可以让你创建类似于iOS 7/8键盘和pin pad 视图风格的按钮菜单。下面是使用JCDialPad创建的视图的一些例子:

创建类似于iOS 7/8键盘风格的按纽菜单:JCDialPad   创建类似于iOS 7/8键盘风格的按纽菜单:JCDialPad创建类似于iOS 7/8键盘风格的按纽菜单:JCDialPad   创建类似于iOS 7/8键盘风格的按纽菜单:JCDialPad

特性

  • 完全可自定义的按钮包含默认值
  • 在您输入的电话号码时自动格式化
  • Set a background image with a frosted overlay
  • Handle button presses in multiple different ways using one simple delegate method
  • 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

用法

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];
https://github.com/jconst/JCDialPad