You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defaults are added to the Habit struct, you need to give it a custom init function if you want to initialize a new instance of the struct without passing in values for every parameter, as the tutorial does at the end of this page. Mine looks like this:
init(title:String, image:Habit.Images){self.title = title
self.selectedImage = image
}
Not a breaking problem but it would probably be helpful to include it in the tutorial.
The text was updated successfully, but these errors were encountered:
When defaults are added to the Habit struct, you need to give it a custom
init
function if you want to initialize a new instance of the struct without passing in values for every parameter, as the tutorial does at the end of this page. Mine looks like this:Not a breaking problem but it would probably be helpful to include it in the tutorial.
The text was updated successfully, but these errors were encountered: