diff --git a/iphone/Maps/UI/PlacePage/PlacePageViewController.swift b/iphone/Maps/UI/PlacePage/PlacePageViewController.swift index 0b3ccdc677..95e0442907 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageViewController.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageViewController.swift @@ -74,15 +74,16 @@ final class PlacePageScrollView: UIScrollView { actionBarContainerView.layer.cornerRadius = 10 actionBarContainerView.layer.masksToBounds = true actionBarContainerView.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMaxYCorner] + + if previousTraitCollection == nil { + scrollView.contentInset = alternativeSizeClass(iPhone: UIEdgeInsets(top: view.height, left: 0, bottom: 0, right: 0), + iPad: UIEdgeInsets.zero) + scrollView.layoutIfNeeded() + } } override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() - if previousTraitCollection == nil { - scrollView.contentInset = alternativeSizeClass(iPhone: UIEdgeInsets(top: scrollView.height, left: 0, bottom: 0, right: 0), - iPad: UIEdgeInsets.zero) - updateSteps() - } panGesture.isEnabled = alternativeSizeClass(iPhone: false, iPad: true) previousTraitCollection = traitCollection }