Nimisha Ranipa
Nimisha Ranipa

Reputation: 8324

UITableViewController SafeAreaLayout for Top & Bottom

I have added UITableViewController in storyboard. This UITableView merges with the home indicator on an iPhoneX device and on top also cut.

How can I fix this issue?

Upvotes: 1

Views: 1454

Answers (2)

Nandkishor mewara
Nandkishor mewara

Reputation: 2562

select your main viewController or your main view in storyboard and enable the option safe area layout Guide

check in this image

Upvotes: 2

Rishi Chaurasia
Rishi Chaurasia

Reputation: 528

use this:

override func viewWillLayoutSubviews() {
        super.viewWillLayoutSubviews()
        tableView.invalidateIntrinsicContentSize()
    }

Upvotes: -1

Related Questions