Post

Replies

Boosts

Views

Activity

Changing constraints of a UIButton
I am making a card game where you choose between two cards to flip over. When the user flips the card it’s moves to the center of the screen so the whole card image is shown as it is too large to fit in the original position. My problem is when the user flips the card back over it does not move back to it’s original position and I cannot figure out how to program it to do so. Is there an easy way to revert the change of constraints when the button is pressed the second time?
1
0
537
Nov ’21
Changing constraints of a UIButton
I am making a card game where you choose between two cards to flip over. When the user flips the card it’s moves to the center of the screen so the whole card image is shown as it is too large to fit in the original position. My problem is when the user flips the card back over it does not move back to it’s original position and I cannot figure out how to program it to do so. Is there an easy way to revert the change of constraints when the button is pressed the second time?
Replies
1
Boosts
0
Views
537
Activity
Nov ’21