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

Commit

Permalink
LEARNER-5726: WhatsNew UI fix on Rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedbashir committed Jul 6, 2018
1 parent 6d82d9a commit 1b03669
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Source/WhatsNewContentController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,40 +91,40 @@ class WhatsNewContentController: UIViewController {

private func setConstraints() {

containerView.snp.makeConstraints { make in
containerView.snp.remakeConstraints { make in
make.edges.equalTo(safeEdges)
}

imageContainer.snp.makeConstraints { make in
imageContainer.snp.remakeConstraints { make in
make.top.equalTo(containerView)
make.trailing.equalTo(containerView)
make.leading.equalTo(containerView)
let height = view.bounds.size.height / ScreenDivider
make.height.equalTo(height)
}

infoContainer.snp.makeConstraints { make in
infoContainer.snp.remakeConstraints { make in
make.top.equalTo(imageContainer.snp.bottom)
make.trailing.equalTo(containerView)
make.leading.equalTo(containerView)
make.bottom.equalTo(containerView)
}

screenImageView.snp.makeConstraints { make in
screenImageView.snp.remakeConstraints { make in
make.top.equalTo(imageContainer).offset(2*StandardVerticalMargin)
make.bottom.equalTo(imageContainer)
make.trailing.equalTo(imageContainer).offset(-LeftRightMargin)
make.leading.equalTo(imageContainer).offset(LeftRightMargin)
}

titleLabel.snp.makeConstraints { make in
titleLabel.snp.remakeConstraints { make in
make.top.equalTo(infoContainer).offset(2*StandardVerticalMargin)
make.centerX.equalTo(infoContainer)
make.trailing.lessThanOrEqualTo(infoContainer).offset(-LeftRightMargin)
make.leading.lessThanOrEqualTo(infoContainer).offset(LeftRightMargin)
}

messageLabel.snp.makeConstraints { make in
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(StandardVerticalMargin)
make.bottom.lessThanOrEqualTo(infoContainer).offset(-StandardVerticalMargin)
make.centerX.equalTo(infoContainer)
Expand Down

0 comments on commit 1b03669

Please sign in to comment.