Swift
92.7K views | +0 today

Managing safe area in SwiftUI

From swiftwithmajid.com

A safe area defines the area within a view that isn’t covered by a navigation bar, tab bar, toolbar, or other views. SwiftUI views respect safe areas out of the box. But there are plenty of situations when you need to customize this behavior. This week we will learn how to manage the safe area in SwiftUI.
No comment yet.

How to Handle Errors in Swift Task Groups

From swiftsenpai.com

In this article, we will explore ways to handle errors occurring within a task group by using simple-to-understand examples and sample code.
No comment yet.

Open Sourcing SwiftUI Navigation

From www.pointfree.co

Today we are open sourcing SwiftUI Navigation, a collection of tools for making SwiftUI navigation simpler, more ergonomic and more precise.
No comment yet.

Composition vs. Inheritance: code architecture solutions explained in Swift

From www.avanderlee.com

Composition and inheritance are two different code architecture solutions that have their own usage and benefits that you should know.
No comment yet.

Animator: easy trick to make UIKit animations reusable | by Oleg Dreyman | Nice Photon iOS | Nov, 2021

From medium.com

And whenever that happens, I answer “oh boy, what a silly question. Everybody know that those are animations and code reusability!”. Let’s say after years of experimentation, you finally came up with…
No comment yet.

spotify/XCRemoteCache

From github.com

Contribute to spotify/XCRemoteCache development by creating an account on GitHub.
No comment yet.

philipturner/ARHeadsetKit: Using $5 Google Cardboard to replicate Hololens

From github.com

Using $5 Google Cardboard to replicate Hololens. Contribute to philipturner/ARHeadsetKit development by creating an account on GitHub.
No comment yet.

Capturing Text From Camera Using SwiftUI

From www.raywenderlich.com

Learn how to capture text from the iPhone camera into your SwiftUI app so your users can enter data more quickly and easily.
No comment yet.

The obscure solution to using an AppDelegate in SwiftUI ·

From www.jessesquires.com

As of iOS 14 and macOS 11, you can define the entry-point and app lifecycle of your app in SwiftUI with the App protocol instead of using the traditional UIApplicationDelegate protocol from UIKit. However, SwiftUI is still missing th
No comment yet.

JohnSundell/CollectionConcurrencyKit: Async and concurrent versions of Swift’s forEach, map, flatMap, and compactMap APIs.

From github.com

Async and concurrent versions of Swift’s forEach, map, flatMap, and compactMap APIs. - GitHub - JohnSundell/CollectionConcurrencyKit: Async and concurrent versions of Swift’s forEach, map, flatMap, and compactMap APIs.
No comment yet.

Dynamic colors in SwiftUI | by Natascha Fadeeva

From tanaschita.com

SwiftUI offers a range of predefined semantic colors we can use in our views. But in most cases, we want to define our own custom colors that automatically adapt to certain user preferences like dark mode changes. We can achieve that by using the asset catalog or or by defining the colors programmatically.
No comment yet.

Building async and concurrent versions of forEach and map

From www.swiftbysundell.com

Let’s take a look at how we can utilize Swift’s built-in concurrency system when performing data transformations using functions like forEach and map.
No comment yet.

Accessibility Smart Invert

From useyourloaf.com

I had the good luck to get a question answered at the recent Apple tech talk on accessibility.
No comment yet.

How to use different fonts for different languages in an iOS application

From sarunw.com

There is no way to add a custom font for each language. Luckily, we can indirectly set that with fallback fonts. Let's learn how to do it.
No comment yet.

Currency TextField in SwiftUI

From benoitpasquier.com

Between banking and crypto apps, it’s quite often we interact with currency inputs on daily basis. If creating a localized UITextField can already be tricky in UIKit, I was wondering how hard it would be to do a similar one in SwiftUI. Let’s see today how to create a localized currency TextField in SwiftUI.
No comment yet.

Custom SwiftUI Environment Values Cheatsheet

From www.fivestars.blog

A collection of the most common custom types we might define into the environment.
No comment yet.

How To Solve Any iOS Crash Ever

From swiftrocks.com

Ever had a crash in which you had absolutely no idea what was going on, and no amount of testing allowed you to reproduce the issue? If so, you've come to the right place!
No comment yet.

Making SwiftUI Previews Work For You

From www.mongodb.com

Learn how to make SwiftUI previews to write better iOS apps faster
No comment yet.

Identifying the Language in a Text using the Natural Language Framework

From www.createwithswift.com

By the end of this article, you will be able to identify the dominant language in a piece of text using the Natural Language framework.
No comment yet.

How to test an iOS Swift package without an Xcode project ·

From www.jessesquires.com

I came across a situation today where I needed to run an iOS test suite for a Swift Package. Previously, this required you to have an Xcode project but it no longer does.
No comment yet.

Async await in Swift explained with code examples

From www.avanderlee.com

Async await in Swift allows to write asynchronous tasks with structured concurrency. Maintain readability in complex code.
No comment yet.

How to make a SwiftUI view to fill its container width and height

From sarunw.com

We can use a frame modifier to make a view appear to be full width and height, but the result might not be what you expected.
No comment yet.

How to define custom SwiftUI environment values

From www.fivestars.blog

How we can extend EnvironmentValues with our custom values
No comment yet.