Top space came on tableview ios 15 swift

Problem: 

In tableview small space came in top of the tableview.But not given in constraints.Also it came in some devices only.


Solution:

        if #available(iOS 15.0, *){

            self.tableView.sectionHeaderTopPadding = 0.0

        }

Use the above code to remove the white space in tableview.

Comments

Popular posts from this blog

store cgpoint in userdefaults iOS swift

libc++abi: terminating due to uncaught exception of type NSException iOS swift