Leading-Aligned Navigation Titles: titleAlignment in UIKit
iOS 27.2 adds a titleAlignment property to UINavigationItem, so you can pin an inline navigation title to the...
// Short, focused solutions to common development problems. Get quick answers and code snippets for your SwiftUI and Swift projects.
iOS 27.2 adds a titleAlignment property to UINavigationItem, so you can pin an inline navigation title to the...
Xcode eats storage through DerivedData, old simulators, device support files, and archives. Here's what each...
The cornerRadius modifier is deprecated in iOS 17. Here's how to use clipShape, RoundedRectangle, and the new...
Learn different ways to set background colors on SwiftUI views, from simple color fills to gradients and...
Learn how to show loading spinners in SwiftUI using ProgressView, including customization options and common...
Learn how to use the allowsHitTesting modifier to make views ignore touches, letting taps pass through to...
Learn how to use the contentShape modifier to expand or customize the tappable area of your SwiftUI views...
Learn how to detect when users shake their device in SwiftUI by bridging to UIKit's motion events and...
Resize images in SwiftUI using resizable(), frame(), scaledToFit, and scaledToFill. See clear examples and...
Learn how to round only certain corners of a SwiftUI view using UnevenRoundedRectangle, custom shapes, and...
Understanding the difference between frame alignment and stack alignment is the key to centering views...
Learn how to display human-readable relative timestamps like "5 minutes ago" or "yesterday" using...
Change where Mac screenshots save with Cmd+Shift+5 then Options, or run defaults write...
Learn how to access your app's App Delegate from anywhere in your Swift code, including from SwiftUI views.
Stop macOS from writing .DS_Store files to network shares and USB drives with one Terminal command. Keep your...
Learn multiple approaches to replace characters and substrings in Swift strings, from simple replacements to...
Learn how to prevent users from dismissing modal sheets by swiping down in SwiftUI using...
Learn how to create and display QR codes in SwiftUI using Core Image filters.
Find any SF Symbol by name without leaving Xcode, using the Library panel search and a few shortcuts.
Learn how to dump all SwiftUI environment values for debugging purposes.
Learn how to align single and multiline text in SwiftUI.
Learn how to use ScrollViewReader and ScrollViewProxy to scroll a SwiftUI list to a specific item...
Learn how to detect when a context menu is open in SwiftUI.
Learn how to create a WebView/WKWebView with a transparent/clear background in SwiftUI.
How to generate random emoji characters in Swift using Unicode scalar ranges.
How to check available and total disk space on iOS devices using URL resource values.
Learn the ways to scale a text view's font size to fit its parent view in SwiftUI.
Learn how to use a WKWebView as a quick way to load a GIF from a URL and display it in a SwiftUI view.
Learn how to force the navigation bar to show a background color in SwiftUI.
Learn how to detect if a SwiftUI app is running in a Xcode Preview.
Learn how to use kCFStringTransformToUnicodeName to get the system name for any emoji.
Learn how to prevent typing with your physical keyboard from dismissing the software keyboard when running...