Sunday, 18 August 2013

Why is my UIButton object not showed?

Why is my UIButton object not showed?

Ther is my code, when I create button:
- (void)viewDidLoad
{
[super viewDidLoad];
UIButton *button=[­[UIButton alloc] initWithFrame:CGRectMake(20, 20, 40,
20)];
button.titleLabel.text=@"but1";
button.backgroundColor=[UIColor redColor];
button.alpha=0.6;
}
Please help me, I tried to change button parameters, origin and other,
itsnot help.

No comments:

Post a Comment