var button=UIButton(frame: CGRectMake(20, 20, 280, 40));
button.backgroundColor=UIColor.blueColor();
button.setTitle("ravi kumar", forState: .Normal);
button.setTitleColor(UIColor.yellowColor(), forState: .Normal);
button.alpha=0.2;
button.layer.borderWidth=0.3;
button.layer.cornerRadius=2;
button.addTarget(self, action: "pressme", forControlEvents: .TouchUpInside);
button.titleLabel.textAlignment=NSTextAlignment.Center;
self.view.addSubview(button);
No comments:
Post a Comment