-(UILabel *)settingLabelProperties:(UILabel *)myLabel{
myLabel = [[UILabel alloc] init];
//myLabel.text = @"XYZ";
myLabel.textColor = [UIColor whiteColor];
myLabel.backgroundColor = [UIColor clearColor];
myLabel.numberOfLines = 0;
myLabel.font = [UIFont systemFontOfSize:17.0];
[self.view addSubview:myLabel];
return myLabel;
}
-(UITextView *)settingTextViewProperties:(UITextView *)myLabel{
myLabel = [[UITextView alloc] init];
//myLabel.text = @"XYZ";
myLabel.textColor = [UIColor whiteColor];
myLabel.backgroundColor = [UIColor clearColor];
myLabel.font = [UIFont systemFontOfSize:17.0];
myLabel.selectable = FALSE;
myLabel.editable = FALSE;
myLabel.scrollEnabled = FALSE;
[myLabel resignFirstResponder];
myLabel.textAlignment = NSTextAlignmentJustified;
[self.view addSubview:myLabel];
return myLabel;
}
-(UIButton *)settingButtonProperties:(UIButton *)myLabel{
myLabel = [[UIButton alloc] init];
//myLabel.text = @"XYZ";
myLabel.titleLabel.textColor = [UIColor whiteColor];
myLabel.backgroundColor = [UIColor clearColor];
myLabel.titleLabel.font = [UIFont systemFontOfSize:20.0];
myLabel.titleLabel.textAlignment = NSTextAlignmentCenter;
[myLabel setBackgroundImage:[UIImage imageNamed:@"btn-bg.png"]forState:UIControlStateNormal];
[self.view addSubview:myLabel];
return myLabel;
}
Note : also set the frame and text of UILabel / UIButton and UITextView.
No comments:
Post a Comment