Swift & SwiftUI
Swift and SwiftUI explained with working code examples: concurrency, data flow, layout and common compiler errors.
-

How to Iterate Over Enum Cases in Swift
Learn how to iterate over Swift enum cases using CaseIterable. Fix ‘does not conform to Sequence’ errors and populate SwiftUI Pickers and…
-

How to Check if a Key Exists in a Swift Dictionary
Learn the most efficient and idiomatic ways to verify whether a key exists in a Swift dictionary, handle optional values, and retrieve…
-

How to Get the Class Name of an Object as a String in Swift
Learn how to get the clean class or struct name of an object as a String in Swift without module prefixes or…
-

How to Find All Available SF Symbols in SwiftUI
Learn how to discover, search, and preview every available SF Symbol for Image(systemName:) in SwiftUI using Xcode’s Library and the SF Symbols…
-

How to Read Safe Area Insets in SwiftUI
Learn how to accurately get top and bottom safe area insets in SwiftUI and modern UIKit without using deprecated keyWindow APIs.
-

Fix: Value of Type ‘UIButton’ Has No Member ‘text’ in Swift
Fix the ‘Value of type UIButton has no member text’ and ‘Expected declaration’ compiler errors in Swift when updating UIKit button titles.
-

Fix: CAGradientLayer Fails to Render in Swift
Fix invisible CAGradientLayer backgrounds in Swift. Learn how to convert UIColors to CGColor, correct layer frames, and subclass UIView properly.
-

How to Format Strings Using Format Specifiers in Swift
Learn how to format strings in Swift using String(format:), C-style format specifiers, and modern FormatStyle for numbers, decimals, and dates.
-

How to Get Current Location Coordinates in Core Location
Learn how to fetch user coordinates using Core Location in Swift. Configure Info.plist, request permissions, and handle delegate updates properly.
-

Fix: UIButton Background Color Fails to Change When Highlighted
Learn how to change the background color of a UIButton when highlighted in Swift using modern configuration handlers, subclasses, and background images.