Skip to content

[CM-1012] Add constrainAspectRatio method to UIView extension. #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Dec 16, 2022

Conversation

devkaranCT
Copy link
Contributor

Introduction

Add constrainAspectRatio method to UIView extension.

Purpose

Creates a constraint on the receiving view, constraining its widthAnchor to its heightAnchor using ratio as the multiplier and optional offset as the constant.

Scope

Updated production code and Test code.

📈 Coverage

Code

Screenshot 2022-12-15 at 2 50 14 PM

@devkaranCT devkaranCT added the enhancement New feature or request label Dec 15, 2022
@devkaranCT devkaranCT self-assigned this Dec 15, 2022
Copy link
Contributor

@mpospese mpospese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice, Dev! Just one slight word change to the documentation comment for the relation parameter.

@mpospese mpospese merged commit 82e91cf into main Dec 16, 2022
@mpospese mpospese deleted the feature/CM-1012-add-constraintAspectRatio branch December 16, 2022 06:25
@mpospese mpospese linked an issue Dec 16, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

Add constrainAspectRatio auto layout extension method to UIView
3 participants