Type Safely

Type Safely

Make Scalable SwiftUI Shapes With Relative X and Y Points

Daily Coding Tip 013

Type Safely's avatar
Type Safely
Dec 31, 2020
∙ Paid
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 …

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture