SwiftUI ’21 in Numbers

WWDC ’21 is finally here and it brought a lot of new toys to play with. In the upcoming weeks I will be writing new articles and will update the Companion for SwiftUI app to include all the new SwiftUI features introduced this year. In anticipation, a week ago I released a beta version of the Companion app that introduced a lot of UI enhancements. The main purpose was to facilitate faster API exploration (read more here).

With the task ahead, the question is, how much work is there? A brief review of the SwiftUI declaration file reveals the following (approximate) numbers:

Number of new types:

TypeCombined macOS iOS tvOS watchOS
Protocols66333
Views87756
Shapes
Property Wrappers33333
Scenes
Environment Values1514141314
Style Protocols221
Style Types15141177
Total4946393133

Although these numbers don’t look too impressive, when we look deeper, we find out that the existing views and protocols have exploded in number of methods, properties and initializers. See below.

Number of New initializers, methods and properties:

Combined macOS iOS tvOS watchOS
Initializers116114987979
Instance methods189179177148148
Static methods2321181818
Instance properties3837313031
Static properties11298846566
Total478449408340342

Number of Deprecated Initializers, methods and properties:

Combined macOS iOS tvOS watchOS
Initializers3029292125
Instance methods1271199
Static methods
Instance properties11111
Static properties00000
Total4337413135

Now that we know where we stand in terms of the task ahead, let’s get to work!

7 thoughts on “SwiftUI ’21 in Numbers”

  1. A Companion for SwiftUI is really an amazing tool for iOS developers. It’s so helpful to see the output of the code right next to the code. I hope that one day you might make a similar product for Combine!

    Reply

Leave a Comment

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close