Skip to content

Instantly share code, notes, and snippets.

@yuxiangq
Last active August 29, 2015 14:11
Show Gist options
  • Save yuxiangq/71a2ac1dabac7b4fa556 to your computer and use it in GitHub Desktop.
Save yuxiangq/71a2ac1dabac7b4fa556 to your computer and use it in GitHub Desktop.
NumberField的用法
//...
-(void)viewDidLoad{
[super viewDidLoad];
NumberField *numberField=[[NumberField alloc] initWithFrame:CGRectMake(100, 100, 120, 44)];
numberField.placeholder=@"只能输入数字";
//设置精度,长度为10,小数点位数为4的苏子。
numberField.numeric=CGNumeric(10, 4);
[self.view addSubview:numberField];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment