Wednesday 13th June
Add To Favourites
I’ve spent some time this evening getting the ‘add to favourites’ functionality working on the Main page. It seems to be successfully adding the chosen sound to favourites. As can be seen by navigating the Favourites page.
When navigating to the Favourites page, the current list of favourited sounds is shown.
Favourite sounds can be played from here.
Remove From Favourites
On the Favourites page a list of the users chosen favourite sounds is shown. From here the user can either play the sound or remove it from the list of favourites.
This was my first dip into local persistence with Xamarin/iOS. It was simple enough.
I may consider changing the ‘+’ on the button for a ‘star’ instead. It might better represent ‘favourite’ perhaps. I may also change the ‘-’ on the button for a trash can to represent delete better.
This link was useful to learn the basics of persistence, however when I tried to implement it, Visual Studio didn’t recognise the ‘Exists’ method that the sample uses.
I used ContainsKey instead.
- More/Better Sounds