iOS Developers Start Here
Not sure where to get started? Try some of these popular topics or browse the latest articles.
Popular Articles
- Get a recap of the best sessions from WWDC 2021 and plan your learning path for the year.
- Using a for loop to work with collections? Take a few minutes to learn about Swift map, filter and reduce operations.
- The Swift If-Case-Let syntax always seems backwards to me. Here's a reminder how you use it.
- How do you add internal padding to a stack view?
- Four new models with three new device sizes including a 5.4" mini. Here's what you need about the iPhone 12.
- Laying out a scroll view is a confusing task. Here's a quick guide to using frame and content layout guides with Xcode 11.
SwiftUI
- A quick guide to creating your own custom SwiftUI environment values for things like global app settings.
- Create your own custom SwiftUI view modifier when you want to reuse a set of modifiers on multiple views.
- Where do you put your SwiftUI preview data? See how Xcode development assets can help.
- Getting to grips with SwiftUI requires thinking a little different. Here's an example where I wanted the equivalent of an adaptive UIKit stack view with an equal distribution to give views equal width.
Swift
- The many ways to create and use Swift Strings. Updated for Swift 5.
- Are you wondering about lazy properties in Swift? Let's look at how and when should you use them.
- Creating a library or framework for the first time? Wondering why the compiler complains that an initializer is inaccessible due to 'internal' protection level?
- I went down a rabbit hole looking at Swift compiler performance this week. Since most of the diagnostic flags are unsupported they are not well documented. Here's my summary of what you need to know.
Swift Package Manager
- Here's my quick guide to creating Swift packages with Xcode.
- How to edit a Swift package in an Xcode project that depends on the package.
- Starting with Xcode 12, you can add more than just source code to your Swift packages.
- Xcode 12 playgrounds can now import and use Swift packages. It's not the solution I was hoping for but it's a step in the right direction.
Dynamic Type
- Dynamic type is an essential iOS feature that allows the user to choose their preferred text size.
- Apple added the font metrics class in iOS 11 to make it less painful to use custom fonts with dynamic type.
- How do you use a custom font with SwiftUI that scales like dynamic type.
- How can you scale other metrics, like spacing, as the dynamic type content size changes? In iOS 14, SwiftUI gained the @ScaledMetric property wrapper that can scale any numeric value.
Auto Layout
- Use layout anchors to create constraints in code without the pain.
- Apple recommends you start with stack views, use constraints as needed.
- Keep your contents safe by learning how to use the safe area layout guide.
- How do you set a background color for a stack view?