Login
You're viewing the masto.alancfrancis.com public feed.
  • Aug 9, 2026, 6:54 PM

    I am not disputing the many benefits of SwiftUI's declarative "UI-as-code" model, but it doesn't seem to matter what I do it feels untidy and never really has that sense of good structure where you can read at one level and only have to drill down if you care. I think it's just inescapable with the model. I want to see

    My View {
    Header()
    Body()
    Footer()
    }

    but its litterered with @State, inits for that _state, view modifiers, private helpers etc.

    💬 1🔄 0⭐ 0

Replies

  • Aug 9, 2026, 6:58 PM

    And I think I miss a lot of the configuration just being in a XIB. It's a view. It has a blue background. That used to be a field in an inspector and now its view.background(.blue). I sort of want the benefits of the concrete state management and view body structure, while hiding a lot of the "noise" that used to be inspector fields.

    Anyhoo, just ranting after my third attempt to refactor some code into something that pleases me to read.

    💬 0🔄 0⭐ 1