#ios

Found 72 articles tagged with #ios

Difference between private and fileprivate in Swift

In Swift, private provides the strictest level of access control. You should only use fileprivate when you have a specific reason to allow access from other parts of the same file.

What's New in Swift 5.10

Swift 5.10 accomplishes full data isolation in the concurrency language model. This important milestone has taken years of active development over many releases.

Difference between compactMap and flatMap in Swift

Method compactMap removes nil results from optional value sequences during transformation, and flatMap flattens nested sequences into a single level sequence.

How to use variadic parameters in Swift

Variadic parameters are useful when you want to create a function that can take any number of arguments of a specific type without specifying them individually.

When to use computed properties or methods in Swift

Both computed properties and methods can provide dynamic behavior, allowing you to calculate values or perform actions based on the current state of an instance.

Feb 26, 2024#swift#ios

How to dismiss a sheet in SwiftUI

There are several ways to dismiss views in SwiftUI like using a @Binding variable, dismiss environment value or deprecated presentationMode.

Jan 07, 2024#swiftui#swift#ios

How to create a custom URLSession in Swift

It's important to consider the specific requirements of your tasks and choose the appropriate session type and configuration accordingly.

Jan 06, 2024#swift#ios#network

How to use lazy variables in Swift

This can be useful when the initial value of a variable is expensive to compute, or when it is not needed until it is actually used in the code.

Sep 27, 2023#swift#ios

How to use xcconfig files in Xcode projects

You can create as many xcconfig files as you want, and you can specify different build configuration files for debug and release builds, and for different platforms and architectures.

Jul 21, 2023#xcode#swift#ios

How to uninstall Xcode and clear its junk completely

Uninstalling Xcode can be tricky due to its junk data. You must locate multiple files, folders, and dependencies that need to be removed to free up space.

Jun 27, 2023#xcode#how-to#ios