title: Swift : UIScrollView does not work for UILabel
body: <p>I want to put a <code>UILabel</code> with a very long text inside a <code>UIScrollView</code> to scroll it's content. For this I have the following code :</p>
  <pre><code>import UIKit
  
  class InfoViewController: UIViewController {
      private let info : String =
          &quot;&quot;&quot;
             A VERY LONG TEXT HERE
          &quot;&quot;&quot;
      
      private let scrollView : UIScrollView = {
          let view = UIScrollView()
          view.translatesAutoresizingMaskIntoConstraints = false
          view.keyboardDismissMode = .onDrag
          view.isScrollEnabled = true
          return view
      }()
  
      private let containerView : UIView = {
          let view = UIView()
          view.translatesAutoresizingMaskIntoConstraints = false
          return view
      }()
  
      private let infoTitleLabel : UILabel = {
          let view = UILabel()
          view.translatesAutoresizingMaskIntoConstraints = false
          view.text = &quot;Title&quot;
          view.font = UIFont.systemFont(ofSize: 18, weight: .bold)
          return view
      }()
  
      private lazy var infoLabel : UILabel = {
          let view = UILabel()
          view.translatesAutoresizingMaskIntoConstraints = false
          view.numberOfLines = 0
          view.text = self.info
          return view
      }()
      
      
      override func viewDidLoad() {
          super.viewDidLoad()
          
          safeArea = view.layoutMarginsGuide
          
          setupView()
      }
      
      private var safeArea : UILayoutGuide!
  
      private func setupView()
      {
          view.backgroundColor = .white
          title = &quot;Info&quot;
          
          view.addSubview(scrollView)
          
          containerView.addSubview(infoTitleLabel)
          containerView.addSubview(infoLabel)
          
          scrollView.addSubview(containerView)
          
          let constraints = [
              scrollView.topAnchor.constraint(equalTo: safeArea.topAnchor),
              scrollView.bottomAnchor.constraint(equalTo: safeArea.bottomAnchor),
              scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
              scrollView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
  
              containerView.topAnchor.constraint(equalTo: scrollView.topAnchor),
              containerView.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor),
              containerView.leadingAnchor.constraint(equalTo: scrollView.leadingAnchor),
              containerView.trailingAnchor.constraint(equalTo: scrollView.trailingAnchor),
              containerView.widthAnchor.constraint(equalTo: scrollView.widthAnchor),
              containerView.heightAnchor.constraint(equalTo: scrollView.heightAnchor),
  
              infoTitleLabel.topAnchor.constraint(equalTo: safeArea.topAnchor, constant: 10),
              infoTitleLabel.leadingAnchor.constraint(equalTo: containerView.leadingAnchor, constant: 10),
              
              infoTitleLabel.heightAnchor.constraint(equalToConstant: 20),
              
              infoLabel.leadingAnchor.constraint(equalTo: infoTitleLabel.leadingAnchor),
              infoLabel.trailingAnchor.constraint(equalTo: containerView.trailingAnchor, constant: -10),
              infoLabel.topAnchor.constraint(equalTo: infoTitleLabel.bottomAnchor, constant: 10),
              infoLabel.bottomAnchor.constraint(equalTo: containerView.bottomAnchor)
          ]
          
          NSLayoutConstraint.activate(constraints)
      }
  }
  </code></pre>
  <p>But I see no scrolling happen. What is the reason for this? Is it related to a dynamic label content size?</p>