In this tutorial, you’ll learn how to connect view controllers to a storyboard, programmatically trigger segues, control visual components and respond to the user interactions.
Thanks for the amazing tutorials. I got so much further with my project with your tutorials than with any others I have watched!
I am modifying your project to make it fit my own, but I have one difference that seems to be causing me problems. On your players scene, you have stars as images that rate the player. I only want one image but I can’t seem to make the adjustment. My code is below:
The error in the screen shot is the one I can’t seem to fix. I would appreciate any help you can give!
Kathie
Hello @kquick,
I’m delighted to know this tutorial helped you out a lot :]
From the screenshot I can’t spot a problem but I have a feeling that this is one of the cases xcode is just showing an error but not where the problem actually is.
Any chance I can see the project? ( I mainly need to see the file where Location class is defined.
Note: I’m assuming that the static function you wrote above has a typo the brackets:
→ [Location} should be → [Location] (notice the closing bracket) but I suppose its just a typo
Thank you for a great article! It was a brilliant way to explore segues and having a variety of different view controllers.
One question - how can you change the star rating of a new player? I don’t seem to have the functionality for that. Did I miss something; if not, could this be coded in so that the star rating is chosen for a new player?
Hello Josh,
Its a pleasure to know you liked the article, its always good to hear positive feedback :]
The rating value is currently not set for new players, you didn’t miss anything. And I didn’t go through that to keep the article short(er) and focused.
in PlayerDetailsViewController.prepare(for:sender:) you can see the rating is always sent with a value of 1. You can build the UI you need to have an initial rating value in PlayerDetailsViewController and then pass the value selected instead of the hardcoded value there.