Can you help me solve this problem? The problem is in the second button with the string array inside the Text Code, if there is an string array inside the text code mark the typical error: "the compiler is unable to type-check this expression in reasonable time", but if I change the string array to a normal string, there is no error. The second button just appears if the sti array has 2 or more elements inside it with the second element.
Group {
let telephone = "tel://"
Button(action:{
let formattedString = telephone + CardPn[0]
guard let url = URL(string: formattedString) else { return }
UIApplication.shared.open(url)
}){
Text(CardPn[0])
.fontWeight(.bold)
.underline()
}
if CardPn.count >= 2{
Button(action:{
let formattedString = telephone + CardPn[1]
guard let url = URL(string: formattedString) else { return }
UIApplication.shared.open(url)
}){
Text(CardPn[1])
.fontWeight(.bold)
.underline()
}
}
}
let formattedString: String = ....