Type Safely

Type Safely

Share this post

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

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

Share this post

Type Safely
Type Safely
Clip Any View To The Bounds of Its Parent Using .clipped()
Share
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…

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