title: Why can i use self when I initialize property with a closure?
body: <p>Official docs (Swift 4.1) says: </p>
  
  <blockquote>
    <p>If you use a closure to initialize a property, remember that the rest
    of the instance has not yet been initialized at the point that the
    closure is executed. This means that you cannot access any other
    property values from within your closure, even if those properties
    have default values. You also cannot use the implicit self property,
    or call any of the instance’s methods.</p>
  </blockquote>
  
  <p>So I guess i need to use lazy var,today I created a button </p>
  
  <pre><code>let loginRegisterButton: UIButton = {
      let button = UIButton(type: .system)
      button.backgroundColor = UIColor.rgb(red: 80, green: 101, blue: 161)
      button.setTitle("Register", for: .normal)
      button.translatesAutoresizingMaskIntoConstraints = false
      button.setTitleColor(UIColor.white, for: .normal)
      button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
      button.addTarget(self , action: #selector(handleRegister), for: .touchUpInside)
      return button
  }()
  </code></pre>
  
  <p>so I just used self in addTarget method and XCode did not seem to bother even more program went without any errors. Everything worked out well.So Why can i use self when I initialize property with a closure? Is there some changes or maybe I missed something? </p>