Open dilipiOSDeveloper opened 4 years ago
var modalInfos: [String] = []
for modal in modals {
let modalInfo = "\(modal.stateName!)"
modalInfos.append(vehicleInfo)
}
dropDowns.dataSource = madalInfos
modalInfos
Pls check i am assigning Modal array not array of string
I have successfully added DropDown to my project its working fine with static data
Above code is working fine , but the issue is with dynamic data from api call
I have array .... var arrayState = [StateModal]()
Modal :
but when i assign dynamic data is shows error
dropDowns.dataSource = [StateModal]
it shows error : Cannot assign value of type '[StateModal].Type' to type '[String]'