Simple iOS replica of the card game War

Swift_War_Cards

A simple game for familiarization with iOS and Swift

Features Used:

  • private/public view properties with @State decorators

  • Views and redering content

    1. Text: Font Color/Size
    2. Button: Creation,Callbacks,Custom Image Labels (button images)
    3. Images: Rendering from local storage, usage of XCode Assets
  • Stacking multiple pieces of content in a container. Similar to HTML div elements

    1. VStack(){} for columns of elements
    2. HStack(){} for rows of elements
    3. ZStack(){} for elements on top of eachother

Others:

  • iterating ranges
  • UI spacing and alignment via Spacer(), .padding(), and more…
  • UI coloring

Major components now understood:

  • Swifts structs and View based rendering
  • Multi view rendering
  • Variable declariation syntax
  • Function call/argument syntax
  • Understanding of the default ‘preview’ struct in association with running the Simulator preview.

GitHub

View Github