I got the way to apply an icon just before the `textfield` starts programmatically but the main concern was that to apply padding just before the icon. 

As it is just touching the border of the textfield. 

I program it like below:

```
override func viewWillAppear(animated: Bool) {

    // Email Icon on left of email Text Field
    let imageView1 = UIImageView()
    let image1 = UIImage(named: "Message.png")
    imageView1.image = image1
    imageView1.frame = CGRectMake(100, 0, 10, 10)
    emailTextField.leftView = imageView1
    emailTextField.leftViewMode = UITextFieldViewMode.Always

    // Password Icon on left of pass Text Field
    let imageView2 = UIImageView()
    let image2 = UIImage(named: "Lock.png")
    imageView2.image = image2
    imageView2.frame = CGRectMake(100, 0, 10, 10)
    passwordTextField.leftView = imageView2
    passwordTextField.leftViewMode = UITextFieldViewMode.Always

}

```

But all the way space between the border and the icon is very less.

Is there any way to make a padding between them? 

Please let me know if there is any way.