Skip to content

ios-divin

iOS is divine. Let's dive in!

  • LinkedIn
  • Home
  • Why?
  • Contact

Category: SwiftUI

SwiftUI Weekly Observations #2

During development in SwiftUI, it is an often question to arise - how to size each element on the screen? The Problem There are basically two choices:  keep the dimensions of the element within itselfset the dimensions during initialisation of the element Here's an example of how two approaches look like separately: Hardcoded Size struct … Continue reading SwiftUI Weekly Observations #2 →

art-divin SwiftUI Leave a comment January 5, 2021January 5, 2021

SwiftUI Weekly Observations #1

Easy Testing Whenever I am creating a new View, I always create a data model struct that I'd use to instantiate that View. I mark it with @State attribute and the View becomes stateful, meaning that whenever the data model changes, View will get updated by the underlying system. struct ScreenModel { var title : … Continue reading SwiftUI Weekly Observations #1 →

art-divin SwiftUI Leave a comment December 31, 2020
Website Powered by WordPress.com.
  • Follow Following
    • ios-divin
    • Already have a WordPress.com account? Log in now.
    • ios-divin
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar