Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Make Scalable SwiftUI Shapes With Relative X and Y Points

Make Scalable SwiftUI Shapes With Relative X and Y Points

Daily Coding Tip 013

Type Safely's avatar
Type Safely
Dec 31, 2020
∙ Paid

Share this post

Type Safely
Type Safely
Make Scalable SwiftUI Shapes With Relative X and Y Points
Share
Image by Bob Dmyt from Pixabay

There are times when we want to position something relative to the bounds of a rectangle.

This is common in UIKit, where every UIView has a frame property we can easily access. This frame comes in the form of a CGRect, which has many properties of its own: minX, midX and maxX, as well as the corresponding properties in the …

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share