Alerts |

This is a companion discussion topic for the original entry at

Hi Jessy,

I was stuck by a concept below. Can you explain the two “.init” here?
I check the developer documentation, the first one seems to be related to Alert?
And the other is more like a String initializer? (I have no idea about that)

.alert(isPresented: .constant(true)) {
title: .init(“Delete image for (book.title)?”),
primaryButton: .destructive(.init(“Delete”)) {
image = nil
secondaryButton: .cancel())