TableView top one space came in swift iOS

 Problem:

I don't had added headers in tableview. But in iOS 15 it came as one small space above the tableview.In previous versions of iOS no space came it works perfectly.


Solution:

Add the below code in viewdidload to solve the above problem.

  if #available(iOS 15.0, *){

            self.tableView.sectionHeaderTopPadding = 0.0

        }

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

store cgpoint in userdefaults iOS swift