0

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
        }

Noresult found

subView Blocked by keyboard

enter image description here

1 Answer 1

1

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.)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.