ScrollView Add SubView in swift 3
<p>I want to try add a view form on scroll view but view don't fully added on scroll view's frame, my code is: </p>

<pre><code>import UIKit

class AddIncomeVC: UIViewController {
    @IBOutlet var scrollView: UIScrollView!
    @IBOutlet var views: UIView!
    override func viewDidLoad() {
        super.viewDidLoad()
        scrollView.contentSize = views.frame.size
        scrollView.addSubview(views)

    }

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        views.frame = CGRect(x: 0, y: 0, width: scrollView.frame.size.width, height: scrollView.frame.size.height)
    }

}
</code></pre>

<p><a href="https://i.stack.imgur.com/KCRUW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KCRUW.png" alt="enter image description here"></a></p>

<p>Thanks,</p>