FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Feature: CGRect extensions corners and edges + center setter by ihar-shalouski · Pull Request #1245 · SwifterSwift/SwifterSwift · GitHub

Feature: CGRect extensions corners and edges + center setter - #1245

Open
ihar-shalouski wants to merge 4 commits into
SwifterSwift:masterfrom
ihar-shalouski:feature/CGRect-Extensions-Corners-And-Edges-And-Center-Setter
Open

ihar-shalouski wants to merge 4 commits into
SwifterSwift:masterfrom
ihar-shalouski:feature/CGRect-Extensions-Corners-And-Edges-And-Center-Setter

Conversation

ihar-shalouski commented Sep 10, 2025
edited
Loading

Copy link
Copy Markdown

Added a setter for CGRect.center.
Added CGRect corners and edges getters/setters. topLeft, topCenter, topRight, centerLeft, centerRight, bottomLeft, bottomCenter, bottomRight.

Checklist

  • I checked the Contributing Guidelines before creating this request.
  • New extensions are written in Swift 5.6.
  • New extensions support iOS 12.0+ / tvOS 12.0+ / macOS 10.13+ / watchOS 4.0+, or use @available if not.
  • I have added tests for new extensions, and they passed.
  • All extensions have a clear comments explaining their functionality, all parameters and return type in English.
  • All extensions are declared as public.
  • I have added a changelog entry describing my changes.

…enterRight, .bottomLeft, .bottomCenter, .bottomRight allowing user easier access and modify rectangle's geometry
ihar-shalouski marked this pull request as ready for review September 10, 2025 11:25

guykogus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice, just 1 little comment.

}

func testCenterSet() {
var rect = CGRect(x: 10, y: 20, width: 30, height: 40)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No need to keep recreating this, create a constant and reuse it.

Copy link
Copy Markdown
Contributor

@ihar-shalouski this is so close to being mergeable. Do you want to finish this?

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL