The SwiftUI vs. Storyboard comparison is partial and coarse. There are a lot of concepts and integration.

But we made a simple test of the lines of code to obtain the same view.

Here the results.


ViewController.swift: 72 rows of code + Main.storyboard (partial – 1 View):  184 rows, created by the graphic interface of XCode. You have to write Swift code and to design the interface with the interface builder, adjusting the constraints.


ContentView.Swift 54 rows of code. You have to write the SwiftUI code.

But the SwiftUI is a big change, biggest than the change from Objective-C to Swift ………

Therefore the SwiftUI is new and it has all the defects of a new thing; it’s not universal, but we think that it is the future, in general it’s simpler..

Leave a Reply