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

How to Get the iOS Status Bar Height in Swift and SwiftUI
Learn how to get the iOS status bar height programmatically in Swift using UIWindowScene, safeAreaInsets, and SwiftUI GeometryReader without deprecated APIs.
-

How to Trim Whitespace From a String in Swift
Learn how to trim leading and trailing whitespace and newlines from a String in Swift using trimmingCharacters(in:), custom extensions, and pure Swift.
-

How to Convert NSURL to NSString in Objective-C and Swift
Learn how to convert NSURL to NSString in Objective-C and URL to String in Swift using absoluteString or path, and avoid common…
-
Fix: Unwanted Padding and Margins in UITextView on iOS
Remove unwanted padding and margins inside UITextView on iOS by setting textContainerInset and lineFragmentPadding to zero in Swift or Storyboard.
-

Fix: Push Notification Device Token Returns 32 Bytes in iOS
Learn why iOS push notification deviceToken prints 32 bytes or garbage in Xcode, and how to convert Data to a clean APNs…
-
How to Set Up UITableView in Swift (Storyboard & Code)
Learn how to set up a UITableView in Swift using Storyboards, programmatic Auto Layout, or UITableViewDiffableDataSource with working code examples.
-

How to Declare Optional Methods in a Swift Protocol
Swift has no plain optional protocol methods. Learn the two ways to fake them: default implementations in an extension, or @objc optional,…


