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 compiling the application and generating the error below in the ModernSearchBar.swift file in the updateSizeSuggestionsView () method updateSizeSuggestionsView()
When compiling the application and generating the error below in the ModernSearchBar.swift file in the updateSizeSuggestionsView () method clearCacheOfList()
private func clearCacheOfList(){
///Clearing cache
for suggestionItem in self.suggestionListWithUrl {
suggestionItem.imgCache = nil
}
///Clearing cache
for suggestionItem in self.suggestionListWithUrlFiltred {
suggestionItem.imgCache = nil
}
self.suggestionsView.reloadData()
}
Corrigir assim: (veja que foi adicionado um if para evitar objeto nulo)
private func clearCacheOfList(){
///Clearing cache
for suggestionItem in self.suggestionListWithUrl {
suggestionItem.imgCache = nil
}
///Clearing cache
for suggestionItem in self.suggestionListWithUrlFiltred {
suggestionItem.imgCache = nil
}
//Veja que foi adicionado um if para evitar objeto nulo
if(suggestionsView != nil){
self.suggestionsView.reloadData()
}
}
The text was updated successfully, but these errors were encountered:
##- OBS 1
updateSizeSuggestionsView()
##- OBS 1
clearCacheOfList()
The text was updated successfully, but these errors were encountered: