How to Change the Background Color of a View in SwiftUI
Learn different ways to set background colors on SwiftUI views, from simple color fills to gradients and materials.
// 10 articles available
Learn different ways to set background colors on SwiftUI views, from simple color fills to gradients and materials.
Learn how to round only certain corners of a SwiftUI view using UnevenRoundedRectangle, custom shapes, and clipShape.
Learn how to resize images in SwiftUI using resizable(), frame(), and different content modes like scaledToFit and scaledToFill.
Learn how to use ToolbarSpacer to add fixed and flexible spacing between toolbar items in SwiftUI, new in iOS 26.
Safe areas keep your content visible and interactive. Here's how they work in SwiftUI and when you should ignore them.
Understanding the difference between frame alignment and stack alignment is the key to centering views exactly where you want them in SwiftUI.
Learn how to add horizontal padding inside a TextEditor without affecting the scrollbar using the contentMargins modifier introduced in iOS 17.
Learn how to create a Material Design-style floating action button in SwiftUI that intelligently moves above the keyboard and avoids blocking text input fields.
Learn how to align single and multiline text in SwiftUI.
Learn the ways to scale a text view's font size to fit its parent view in SwiftUI.