...but did you know it has a hidden feature? 🤨
Let me explain 😌
...but did you know it has a hidden feature? 🤨
Let me explain 😌
let name: String?
"Hi, \(name ?? "stranger")"
```
This code is super common to deal with an Optional inside a String interpolation.
But did you know that Swift 6.2 introduces a more powerful syntax? 🤨
Let me explain 😌
let name: String?
"Hi, \(name ?? "stranger")"
```
This code is super common to deal with an Optional inside a String interpolation.
But did you know that Swift 6.2 introduces a more powerful syntax? 🤨
Let me explain 😌
struct MyModifier: ViewModifier {
// ...
}
```
Have you ever created a custom ViewModifier? 🤨
Did you know that it's actually often not really needed? 🥲
Let me explain 😌
struct MyModifier: ViewModifier {
// ...
}
```
Have you ever created a custom ViewModifier? 🤨
Did you know that it's actually often not really needed? 🥲
Let me explain 😌
Good news: It's totally possible to opt-out of the new UI design!
Let me show you how 😌
Good news: It's totally possible to opt-out of the new UI design!
Let me show you how 😌
All you need to do is put the function name between backquotes...
...and you can use characters that are not allowed in function names, like white spaces or operators!
Perfect for functions that implement tests 👌
All you need to do is put the function name between backquotes...
...and you can use characters that are not allowed in function names, like white spaces or operators!
Perfect for functions that implement tests 👌
...but did you know there's one mistake that's very easy to make if you're not careful?
Let me explain 😌
...but did you know there's one mistake that's very easy to make if you're not careful?
Let me explain 😌
(make sure to install macOS Tahoe beta if you want to try the feature!)
(make sure to install macOS Tahoe beta if you want to try the feature!)
It's totally possible to opt-out of the new UI design!
Just add the key UIDesignRequiresCompatibility to your Info.plist, with the value YES 👌
But be careful: Apple said it will only be allowed until next year...
It's totally possible to opt-out of the new UI design!
Just add the key UIDesignRequiresCompatibility to your Info.plist, with the value YES 👌
But be careful: Apple said it will only be allowed until next year...
(make sure to install macOS Tahoe beta if you want to try the feature!)
(make sure to install macOS Tahoe beta if you want to try the feature!)
But did you know it has a hidden feature? 🤨
Let me show you 😌
But did you know it has a hidden feature? 🤨
Let me show you 😌
(make sure to install macOS Tahoe beta if you want to try the feature!)
(make sure to install macOS Tahoe beta if you want to try the feature!)
(make sure to install macOS Tahoe beta if you want to try the feature!)
(make sure to install macOS Tahoe beta if you want to try the feature!)
(make sure to install macOS Tahoe beta if you want to try the feature!)
(make sure to install macOS Tahoe beta if you want to try the feature!)
But it still uses XCTest under-the-hood though: maybe we'll get support for UI tests in Swift Testing next year 🤞
But it still uses XCTest under-the-hood though: maybe we'll get support for UI tests in Swift Testing next year 🤞
Basically this is like SwiftUI Previews, but for non-UI code 👌
Basically this is like SwiftUI Previews, but for non-UI code 👌
But did you know that SwiftUI has a built-in way to solve this? 🤨
And that it only requires a single line of code? 😌
But did you know that SwiftUI has a built-in way to solve this? 🤨
And that it only requires a single line of code? 😌
It's called `.privacySensitive()` and it will automatically hide the view it's attached to as soon as the app goes into the background 👌
It's called `.privacySensitive()` and it will automatically hide the view it's attached to as soon as the app goes into the background 👌