I am making an app where the user can select 1 of 7 different ball colors to play as. Each color I have assigned an id of 1-7 as integers. The ball selection screen and the actual game screen are 2 separate classes and view controllers. What I want to do is create an int called "BallColor" and then whenever the user clicks the button corresponding to the color then BallColor is equal to the id of that color. Then I need that number transferred over to my games class so it will check against my if statements to know which is the correct ball the user wants to play as. I have tried 5 different method and been researching this for about 6 hours straight and cannot find a good tutorial on how it should be done correctly. Can anyone please help me?? I don't want to give up tonight, but I have no other resources to check. Any help at all would be appreciated!
- Russ