Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
fix: Layout discrepancy on landscape mode (#1735)
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedbashir committed Mar 14, 2023
1 parent bf1c52d commit 45725f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Source/CourseUnknownBlockViewController.swift
Expand Up @@ -163,10 +163,10 @@ class CourseUnknownBlockViewController: UIViewController, CourseBlockViewControl
view.backgroundColor = OEXStyles.shared().neutralWhiteT()

valuePropView.snp.makeConstraints { make in
make.top.equalTo(view).offset(StandardVerticalMargin * 2)
make.leading.equalTo(view)
make.trailing.equalTo(view)
make.bottom.equalTo(view)
make.top.equalTo(safeTop).offset(StandardVerticalMargin * 2)
make.leading.equalTo(safeLeading)
make.trailing.equalTo(safeTrailing)
make.bottom.equalTo(safeBottom)
}
}

Expand Down
5 changes: 1 addition & 4 deletions Source/DiscoveryWebViewHelper.swift
Expand Up @@ -57,10 +57,7 @@ class DiscoveryWebViewHelper: NSObject {
guard let container = delegate?.webViewContainingController() else { return }
container.view.addSubview(contentView)
contentView.snp.makeConstraints { make in
make.top.equalTo(0)
make.trailing.equalTo(container.view)
make.leading.equalTo(container.view)
make.bottom.equalTo(container.view)
make.edges.equalTo(container.safeEdges)
}
loadController.setupInController(controller: container, contentView: contentView)
refreshController.setupInScrollView(scrollView: webView.scrollView)
Expand Down
4 changes: 2 additions & 2 deletions Source/HTMLBlockViewController.swift
Expand Up @@ -101,8 +101,8 @@ class HTMLBlockViewController: UIViewController, CourseBlockViewController, Prel
}

openInBrowserView.snp.remakeConstraints { make in
make.leading.equalTo(view)
make.trailing.equalTo(view)
make.leading.equalTo(safeLeading)
make.trailing.equalTo(safeTrailing)
make.top.equalTo(webController.view.snp.bottom)
make.height.equalTo(55)
make.bottom.equalTo(safeBottom)
Expand Down

0 comments on commit 45725f8

Please sign in to comment.