Old driver iOS weekly, just for you to present valuable information.

You can also contribute to the project, if you find valuable information, articles, tools, etc., please send it to us in Issues, we will deal with it as soon as possible. Be sure to include a reason for your recommendation. Suggestions and comments are also welcome to Issues.

The novice recommended

🐎 Enumerating elements in ForEach

Looping: This article describes how to use SwiftUI’s ForEach to iterate over presentation lists and number list elements. The author recorded the whole process of the reconstruction and optimization of this part of the code, and used the key-path-based writing method to make the code clear and easy to understand, which is a good material for learning the optimization code.

🐎 7 Tips for writing high-performance architectures in iOS

Speedboy: This article introduces the considerations of defining a structure in iOS by explaining how it is stored and used in memory.

The article

🌟 πŸ•2019 Year-end Summary

A belated year-end review in which the author summarizes his gains and changes over the past year in five aspects:

  • Technology & Workplace
  • investment
  • Reading a book
  • life
  • 2020 outlook

Time is limited to everyone, but everyone has different things to do. As a technician, it seems necessary to dabble in other directions besides advancing on the technical road, which is a matter of opinion. I believe readers will have their own feelings.

🌟 πŸ• 🚧Struct or class? Let the swift-Nio developers tell you

@Gobang: Those of you who know anything about Swift know that the Swift Community favors Struct because it’s a value semantics that ensures that your program doesn’t get weird Side effects. However, the authors of this article took a closer look at SwiftNIO when they found that Struct parameters were slower than Class parameters in function transfer. At the same time, the author proposes a design of nested Class in Struct with COW mode, which can not only improve performance, but also maintain value semantics, which is a good work suitable for Swift developers.

πŸ• @

@eyrefree: A beginner’s guide to objective-C instructions that begin with the @ sign, and a brief description of their design philosophy (with a Lisp hack).

Reference: Chinese translation link

🌟 πŸ•Binary Frameworks in Swift

PSPDFKit introduces the details of Swift binary SDK distribution from the perspective of a service provider, including the meaning of ABI stability and development content, and introduces the whole development process in the form of a timeline.

🌟 🐒Why is SwiftPM so much slower than Cocoapods?

@Hertzensen: CocoaPods developer Orta Therox wrote an article analyzing why SwiftPM is slower than CocoaPods. Generally speaking, SwiftPM and SwiftPM focus on different levels: SwiftPM needs to focus on full-link compilation and support Linux and other systems, rather than Xcode. CocoaPods is built on top of Xcode, and its products are designed for Xcode, just keep an eye on macOS.

🐎Goodbye, clean code

JimQ: Another “think twice” post for “code cleanliness freaks”. As the author said, “clean code” addicted, good in “to eliminate duplicate code”, is our most developers would experience stage, but as a developer should not only focus on “clean”, but also need to balance everything into account, considering the influence on team cooperation efficiency, is able to cope with demand change, And the impact of this behavior on the whole project and so on.

πŸ• TopLevelEncoder and TopLevelDecoder in Combine

@ anotheren: When using Codable, you may find that JsonDecoders and PropertyList Decoders that are built into the standard library don’t follow a single protocol that defines a top-level decoder, and Data isn’t the only codecs that start and end. Therefore, in Combine, TopLevelDecoder and TopLevelEncoder protocols are defined to uniformly describe top-level codecs. In this paper, the reasons for the existence of these protocols are briefly discussed based on practical cases. In a future release of Swift, they will be added to the standard library in a way that does not destabilize the ABI.

code

Barber

@ old donkey: The framework takes a tricky approach to speeding up incremental compilation in project development by removing the AppDelegate and creating its own dependency for each large ViewController. This way, when developing for a ViewController, you don’t have to make small changes to cause a complete recompile.

I don’t recommend using such a framework for serious projects, but it’s a good idea.

Pure-Swift-UI

AidenRao: PureSwiftUI is a tool class that assists SwiftUI to optimize the experience of writing SwiftUI.

  • A large number of display parameters have been removed and the code structure is clearer by combining parameter configurations through a more expressive interface.
  • As long as your variables are Int, Double, Float, or CGFloat, PureSwiftUI can be mixed.
  • Modifying the backup GeometryProxy for geometryReader does not affect the geometryReader layout.
  • OffsetToPosition modifier that sets the position of a View to an absolute position in any coordinate space.
  • Conditional modifiers replace ternary operators to conditionally style views based on state.
  • SF Symbols uses constants instead of strings to call.

push

Echo Technology is recruiting, looking for resume:

  • Echo science and technology R & D center long-term recruitment of iOS development engineers, Android development engineers, Go development engineers/architects, front-end development engineers, other products, operations, sales and other non-technical department positions are also welcome to send!
  • Located in Shanghai, our main business is a trading platform for trendy cultural products & community. Our team has a good technical atmosphere, high acceptance of new technologies and an open attitude to all kinds of tools/methods that can improve team development efficiency.
  • Resume with [name + post + mobile phone number] format to [email protected] or directly add wechatEyreFree.

Senior driver Weekly team combined knowledge collection and SwiftGG Translation group included a reliable internal promotion position.

If you want to looking for a job, click here: www.yuque.com/iosalliance…

If you want to recruit people, click here: www.yuque.com/iosalliance…

Of course, you are also welcome to pay attention to our weekly report, we will update the editorial post at the bottom of each weekly report.

Pay attention to our

We have opened an official account, and every issue will be released on the official account (OldDriverWeekly), welcome to follow.

RSS feeds are also supported: github.com/SwiftOldDri… .

instructions

🚧 indicates the need to climb the wall, and 🌟 indicates the editor’s recommendation

Estimated reading time: 🐎 in a short time (1-10 mins); πŸ• medium (10-20 mins); 🐒 slow (20+ mins)