Skip to content
Snippets Groups Projects
Commit 6b78309a authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Update scroll view setup in ProfileCodeController

parent 45244f96
Branches
Tags
1 merge request!91Fix transition bug when the keyboard is presented
......@@ -60,14 +60,20 @@ public final class ProfileCodeController: UIViewController {
}
private func setupScrollView() {
scrollViewController.contentView = screenView
scrollViewController.scrollView.backgroundColor = Asset.neutralWhite.color
addChild(scrollViewController)
view.addSubview(scrollViewController.view)
scrollViewController.view.snp.makeConstraints {
$0.edges.equalToSuperview()
}
scrollViewController.view.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
scrollViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
scrollViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
scrollViewController.view.leftAnchor.constraint(equalTo: view.leftAnchor),
scrollViewController.view.rightAnchor.constraint(equalTo: view.rightAnchor),
])
view.setNeedsLayout()
view.layoutIfNeeded()
scrollViewController.didMove(toParent: self)
scrollViewController.contentView = screenView
scrollViewController.scrollView.backgroundColor = Asset.neutralWhite.color
}
private func setupBindings() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment