lundi 29 novembre 2021

Double Sided Flashcards [closed]

Using swift and xcode to try and create random flash cards that use a face up and face down (or double sided) rounded rectangles as a card view. One side will be text and the other side will be a corresponding image. I am trying to make it so a rounded rectangle will appear with some text, tap it to flip it over and view an image corresponding to that text, and then press an arrow or other button to generate a new random item from a vast array or dictionary containing all the text and image pairs. If anyone can help me with this it would be much appreciated.

itemArray["Hat", "Gloves", "Shoes"].shuffle

Trying to make this end up looking more like:

Dictionary{"Hat": Hat.img, "Gloves": Gloves.img, "Shoes": Shoes.img}

Where the key being the cardIsFaceUp and the value being cardIsFaceDown. Tapping the rounded rectangle on screen to flip the card over to view a corresponding image to the text. Is this possible?




Aucun commentaire:

Enregistrer un commentaire