-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
##- OBS 1
- When compiling the application and generating the error below in the ModernSearchBar.swift file in the updateSizeSuggestionsView () method
updateSizeSuggestionsView()
private func updateSizeSuggestionsView(){
var frame: CGRect = self.suggestionsView.frame
frame.size.height = self.getExactMaxHeightSuggestionsView(newHeight: self.suggestionsView.contentSize.height)
UIView.animate(withDuration: 0.3) {
self.suggestionsView.frame = frame
self.suggestionsView.layoutIfNeeded()
self.suggestionsView.sizeToFit()
}
}
- Corrigir assim: (veja que foi adicionado um if para evitar objeto nulo)
private func updateSizeSuggestionsView(){
if(suggestionsView != nil){
var frame: CGRect = self.suggestionsView.frame
frame.size.height = self.getExactMaxHeightSuggestionsView(newHeight: self.suggestionsView.contentSize.height)
UIView.animate(withDuration: 0.3) {
self.suggestionsView.frame = frame
self.suggestionsView.layoutIfNeeded()
self.suggestionsView.sizeToFit()
}
}
}
##- OBS 1
- 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()
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels