Stacking up buttons - Guess the Flag SwiftUI Tutorial 6/9

Поділитися
Вставка
  • Опубліковано 27 жов 2024

КОМЕНТАРІ • 3

  • @Nouta19
    @Nouta19 11 місяців тому +1

    by the way, I just somehow manage to copy the lowercase files like this:
    var countries = ["estonia", "france", "germany", "irelead","Iitaly", "nigeria", "poland", "spain", "uk", "ukraine", "us"]
    Then you can add Text(countries[correctAnswer].capitalized) to line 18 of the code.

  • @aztec_necr7136
    @aztec_necr7136 Рік тому +5

    var countries = ["Estonia", "France", "Germany", "Ireland", "Italy", "Nigeria", "Poland", "Spain", "UK", "Ukraine", "US"]

    • @lukeallen8959
      @lukeallen8959 8 місяців тому

      By switching "Russia" for "Ukraine", you have unintentionally introduced a bug for people that copy and paste this. Because there's no "Ukraine" image, sometimes, only two flags will be rendered.
      The correct countries list is here:
      var countries = ["Estonia", "France", "Germany", "Ireland", "Italy", "Nigeria", "Poland", "Russia", "Spain", "UK", "US"]