Swift
92.7K views | +0 today

Debugging on iOS 14 with Xcode 11

From hybridcattt.com

Every year we get a new major iOS version to test our apps on. Some apps can’t be upgraded to Xcode 12 right away, but they are still expected to work well on iOS 14. With some tricks, we can not only run on iOS 14 but also debug with breakpoints and much more.
No comment yet.

How iOS Apps Adapt to the various iPhone 12 Screen Sizes | by Geoff Hackworth | Oct, 2020

From hacknicity.medium.com

At their October 2020 event, Apple announced four iPhone 12 models: iPhone 12 mini, iPhone 12, iPhone 12 Pro and iPhone 12 Pro Max. The iPhone 12 and 12 Pro have the exact same screen resolution as each other and behave identically. So there are only really three screen resolutions to consider.
No comment yet.

A Step by Step Guide on XCFramework and Swift Package

From www.appcoda.com

In this tutorial, we will show you how to create a XCFramework binary framework and how to use Swift packages in order to distribute a XCFramework, either those are local or remote.
No comment yet.

Formatting Notes and Gotchas • Andy Ibanez

From www.andyibanez.com

Usage notes and things to watch out for when formatting content with NSFormatters.
No comment yet.

Reduce boilerplate code with an automatic synthesis of Equatable and Hashable conformance

From sarunw.com

Equatable and Hashable are two essential protocols in the Swift world. Let's learn an old Swift feature that you might forget.
No comment yet.

Do protocols break Single Responsibility Principle?

From dmtopolog.com

In previous posts we’ve mentioned all the different use cases for this language feature. Now let’s consider some hidden complications which we get together with all the power.
No comment yet.

The Modern Ways to Reload Your Table and Collection View Cells

From swiftsenpai.com

Reloading NSDiffableDataSourceSnapshot on table and collection view is not as straightforward as you think. Find out more in this article.
No comment yet.

Lazy stacks secrets

From fivestars.blog

A couple of weeks ago I’ve updated AStack, a micro library that switches any SwiftUI stack axis when the environment content size category is among the accessibility ones.
No comment yet.

Overriding UserDefaults for improved productivity

From www.avanderlee.com

UserDefaults are often used to alter flows in the app and store state. Using launch arguments we can adjust these values for development.
No comment yet.

Setting default values for NSUserDefaults

From sarunw.com

NSUserDefaults is a go-to database for saving users' preferences. Learn how to populate it with your default values.
No comment yet.

Combine: From zero to… Oh! I get it.(Part I) | by Andrés Pesate | Dev Jam | Sep, 2020

From medium.com

Often in life when we are presented with something new to us, that we don’t fully understand, we tend to treat it as a threat. It’s only after spending some time with it, making sense of what it…
No comment yet.

Mastering ScrollView in SwiftUI

From swiftwithmajid.com

We had the scroll view from the very first version of SwiftUI. It was quite limited. But this year changed everything when Apple released ScrollViewReader during WWDC 20. This week we will learn all about scroll views in SwiftUI. We will learn how to scroll to the particular position and read the current offset of scroll view content.
No comment yet.

Introducing Swift Atomics

From swift.org

I’m delighted to announce Swift Atomics, a new open source package that enables direct use of low-level atomic operations in Swift code. The goal of this library is to enable intrepid systems programmers to start building synchronization constructs (such as concurrent data structures) directly in Swift.

No comment yet.

SwiftUI TabView Introduction and Tab Bar Customization

From www.appcoda.com

SwiftUI provides a UI component called TabView for building a tab bar interface. This tutorial shows you how to work with it and customize the tab bar.
No comment yet.

Label

From fivestars.blog

One of the new SwiftUI components from this year is Label. The SwiftUI team did is a great job with Label’s documentation: if you’re not familiar with this view yet, please have a read at it first.
No comment yet.

Using matchedGeometryEffect to Create View Animation in iOS 14

From www.appcoda.com

SwiftUI already made it pretty easy to create view animation. In iOS 14, the new matchedGeometryEffect modifier takes view animation to the next level.
No comment yet.

Disabling Keyboard Avoidance in SwiftUI's UIHostingController | steipete's blog

From steipete.com

UIHostingController has logic to avoid the keyboard, which is often unwanted. We explore a hack to disable this feature.
No comment yet.

Implementing a Tracking System for iOS with CoreData

From freeletics.engineering

As iOS developers, we often need to implement tracking in our applications. There are many third-party frameworks that would allow us to implement tracking systems in our projects. But in this article, we are going to talk about how we have implemented our custom tracking infrastructure at Freeletics with the help of CoreData, without using any third party framework.
No comment yet.

Context-Bound Types

From www.fabisevi.ch

I’ve been thinking about privacy lately. No, not online privacy, but about APIs can balance exposing the right amount of implementation details without revealing too much.
No comment yet.

XcodeGen — Collaboration Made Easy | by Roberto Frontado | Dev Jam

From medium.com

If you have ever worked in a team, I’m sure that many times, you’ve encountered conflicts with the .xcodeproj file while merging your code. Solving this kind of conflict is not always easy…
No comment yet.

Binary Frameworks as Swift Packages | Inside

From pspdfkit.com

What we learned from experimenting with binary frameworks as Swift packages in Xcode 12.
No comment yet.

Building an Expandable List Using UICollectionView: Part 2

From swiftsenpai.com

Learn to create a multi-section list of expandable cell & expandable section using UICollectionView and NSDiffableDataSourceSectionSnapshot.
No comment yet.

App Onboarding with SwiftUI. Onboarding is the process of helping… | by Pete Smith | Zendesk Engineering | Sep, 2020

From medium.com

Onboarding is the process of helping users to understand an app, and hopefully, encouraging them to continue to use it. Onboarding flows usually consist of one or more screens explaining how a user…
No comment yet.

Protocol extensions

From dmtopolog.com

When people speak about how powerful protocols are in Swift, in a lot of cases they consider protocol extensions as part of this power. That’s unfair because it’s a separate language feature, and an interesting one. Here we will detach and dissect it.
No comment yet.

Impossible SwiftUI views

From fivestars.blog

When defining a SwiftUI view, it comes automatic to write struct MyView: View followed by var body: some View { ... }: all our views are composed by other views, but at some point SwiftUI needs to draw something on the screen: when does it end? How does SwiftUI know that it has reached the bottom of a view hierarchy?
No comment yet.