I just started developing in Swift.

I created an UIButton dynamically and added it to the View.
My issue is the view is not displaying the button.

**My Code:**

```
var button:UIButton = UIButton();
button.frame = CGRect(x: 100, y: 250, width: 100, height: 50);
button.setTitle("Midhun", forState: UIControlState.Normal);
self.view.addSubview(button);

```

Then I added image to the button and then it is showing:

```
button.setImage(UIImage(named: "step_first.jpg"), forState: UIControlState.Normal);

```

I couldn't figure out what is happening. Please help