//快速创建Button
//UIButton
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>);
[button setTitle:<#(NSString *)#> forState:UIControlStateNormal];
[button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
[button setTitle:<#(NSString *)#> forState:UIControlStateHighlighted];
[button setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
[button setBackgroundImage:<#(UIImage *)#> forState:UIControlStateNormal];
[button setBackgroundImage:<#(UIImage *)#> forState:UIControlStateHighlighted];
button.titleLabel.font = [UIFont systemFontOfSize:12.0];
button.backgroundColor = [UIColor redColor];
[button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button];
//创建Lable
_timeLable = [[UILabel alloc] initWithFrame:CGRectZero];
_timeLable.textColor = [UIColor blackColor];
_timeLable.font = [UIFont fontWithName:@"Quicksand" size:12.0];
_timeLable.textAlignment = NSTextAlignmentLeft;
_timeLable.numberOfLines = 0; //自动折行
_timeLable.backgroundColor = [UIColor clearColor]; //debug背景颜色
_timeLable.textColor = [UIColor colorWithRed:83.0/255.0 green:83.0/255.0 blue:83.0/255.0 alpha:1];
[_allViewBackground addSubview:_timeLable];
//快速创建TextField
//textField
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>)];
textField.placeholder = @"请输入您的用户名";
textField.textColor = [UIColor colorWithRed:0/255.0 green:114.0/255.0 blue:181.0/255.0 alpha:1];
textField.textAlignment = NSTextAlignmentLeft;
textField.clearsOnBeginEditing = NO;
textField.autocorrectionType = UITextAutocorrectionTypeNo;
textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
textField.font = [UIFont fontWithName:@"Heiti SC" size:14.0];
textField.keyboardType = UIKeyboardTypeDefault;
textField.backgroundColor = [UIColor clearColor]; //debug背景颜色
[textField becomeFirstResponder];
textField.delegate = self; //设置代理
[self.view addSubview:textField];