Reputation: 1712
I have added a subview to my UItableView when No result found. but I have a problem with the portion of "No result found"UIView. it is centre and block by iOS keyboard. how can I fix the layout Constraint?
if(filteredAccounts!.isEmpty){
hideSection = true
view.backgroundColor = UIColor.white
view.addSubview(noResultView)
noResultView.center = view.center
self.hubtableView.reloadData()
hubtableView.separatorStyle = .none
}
subView Blocked by keyboard
Upvotes: 0
Views: 185
Reputation: 537
I believe the table view handles adjusting the view to account for the keyboard. However, since you’re adding a new different view, you’ll have to handle the adjustment yourself.
However, if the search is nil, you could instead return a single cell instead of adding a view. (Or do something similar with the header view, background view, etc.)
Upvotes: 1