I'm new to iOS programming and I have an app assignment for school. I'll briefly describe what I'm trying to do and what I have.
I have 2 container views. The one is the "bottom bar" of the game, and the other is the "content" of the game. Heres what it looks like in my storyboard:
The CenterViewController has an ImageView,4 buttons, and a label.
The BottomBarViewController has labels and a button. The label shows as "10" is a Countdown timer, and the button is at the far right of the container.
What I want to do:
I'm trying to control the CenterViewController for 2 scenarios:
1.) The 10 second timer hits 0
2.) The button is pressed before the time runs out
So basically once you hit Play, I want the CenterViewController to be displaying the image. Once the timer from the BottomBarViewController reaches 0 OR the Button is pressed, I want the Image from the CenterViewController to update to hidden and the Buttons behind it to be updated to visible.
I'm not sure how to go about implementing this. Some how the two view controllers need to have access to each others data, but I'm not sure how.
Aucun commentaire:
Enregistrer un commentaire