Type Safely

Type Safely

Clip Any View To The Bounds of Its Parent Using .clipped()

Daily Coding Tip 135

Millie Sturgeon's avatar
Millie Sturgeon
Jul 24, 2022
∙ Paid
foggy mountain summit
Photo by v2osk on Unsplash

In UIKit it’s possible to tick Clip to Bounds when any UIView subclass is selected on a Storyboard. This toggles a Boolean property called clipsToBounds, which makes it fairly inconsistent that the Storyboard interface says ‘clip’ rather than ‘clips’.

In SwiftUI this inconsistency has been left behind, but the equivalent modifi…

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