title: ios swift UILabel font size is not change programatically
body: <p>I want to change font size of UILabel but it not changing programatically.<br>
  when i'm changing text color it change color</p>
  
  <p>I was try many things but not working</p>
  
  <p>following is my code</p>
  
  <pre><code>@IBOutlet weak var lblExample: UILabel!
  override func viewDidLoad() {
          super.viewDidLoad()
  
          self.lblExample.font = UIFont(name: self.lblExample.font.fontName, size: 40)
          //self.lblExample.font = UIFont.systemFont(ofSize: 40)
          //self.lblExample.font = UIFont(name: "System", size: 40)
          //self.lblExample.font = self.lblExample.font.withSize(40);
  
          self.lblExample.textColor = UIColor.green
      }
  </code></pre>
  
  <p>Attribute Inspector Property</p>
  
  <p><a href="https://i.stack.imgur.com/wxU6X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wxU6X.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>How to change font of UILabel<br>
    why is it not changing</p>
  </blockquote>