Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

How can I know which side of a card is being shown? #18

@Sweeper777

Description

@Sweeper777

In my app, I want to have a button on the background view that controls the flipping of cards. When you tap it once, the revealed card gets flipped. When you tap it again, the revealed card is flipped back. To implement this, I need a way of determine whether the revealed card is flipped or not, in order to write code like this:

if revealedCardIsFlipped {
    layout.flipRevealedCardBack()
} else {
    layout.flipRevealedCard(toView: someView)
}

As I mentioned in #17, if I could detect when the card is flipped, I could keep track of the revealed card's state using a variable myself. But since I can't, I don't know what to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions