Articles

In Swift, an indexPath is a list of indexes that, together, represent the path to a specific location in a tree of nested arrays.

It describes an item’s position inside a table view or collection view, storing both its section and its position inside that section.

Source de l’article sur DZONE

A UICollectionView is a way of arranging a content grid or a list of subviews (UICollectionViewCells) in a scrollable view. Collection views are ubiquitous: Instagram’s Search page, Chrome’s tabs overview, or your Favorites lists on media streaming services like Netflix and Crave. All of these examples use a UICollectionView to display cells.

For this article, I’ve been working with Clearbridge Mobile iOS Developer, Conor Masterson, to learn about collection views and resolving the issue of code clutter that sometimes happens when recycling UICollectionViewCells. This post will specifically explore how to implement a protocol for brevity in collection view code. Credit goes to Conor for writing the sample application that goes along with this article. If you’d like to look at the full configuration code, there is a GitHub link at the end of the post.  

Source de l’article sur DZONE

One of the nice things about Swift 5 is the final stabilization of the ABI. This is actually a big deal. The application binary interface defines exactly how data is stored in programs, shared from libraries, things like that. It includes name decoration, class and object definitions, and so on. Now that we have a stable ABI, building tools that analyzed and manipulate these binary representations will become much, well, not easier, but not as much a waste of time. Until now, you were just about guaranteed to have any tools you created broken by new Swift versions. With a stable ABI? This shouldn’t happen.

We just covered how classes are defined in Swift 5, and we discovered that they reflect the basic design in Objective-C. There are some key differences though, and one of those is member method definitions.

Source de l’article sur DZONE