Swift Tips #4 – Safely Subscripting an Array

preview_player
Показать описание
#iOS #swift #softwaredeveloper #iosdeveloper

Thank you for watching this video 🙌

Did you find this tip useful? Are you planning on using it in your apps? Let me know in the comments 🚀

Рекомендации по теме
Комментарии
Автор

A little side note, you can also create a setter in the subscript, so something like data[safe: 5] = 4 will work too! :)

felix.herrmann
Автор

Great tip. I am inclined to think this should be the default behavior.

fredericadda
Автор

Nice! Thank you 🙂
Pro tip: you should create a GitHub repo with all the examples you provide in your videos 🤓

chrisscholly