Before updating to Xcode 9.0 , I use Xcode 8.3.3 to work on uitableviewcontroller. There has first row explicit large . After upgrading to Xcode 9.0, it occurs. Even though I cancel automaticallyAdjustsScrollViewInsets , the padding is still here. Hass anyone ever encountered to this issue ? How to resolve it ?
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem()
let btn1 = UIButton(type: .custom)
btn1.setImage(UIImage(named: "add"), for: .normal)
btn1.frame = CGRect(x: 0, y: 0, width: 30, height: 30)
btn1.addTarget(self, action: #selector(createStaff(sender:)), for: .touchUpInside)
let item1 = UIBarButtonItem(customView: btn1)
let btn2 = UIButton(type: .custom)
btn2.setImage(UIImage(named: "back_arrow"), for: .normal)
btn2.frame = CGRect(x: 0, y: 0, width: 30, height: 30)
btn2.addTarget(self, action: #selector(back(sender:)), for: .touchUpInside)
let item2 = UIBarButtonItem(customView: btn2)
self.navigationItem.setRightBarButton(item1, animated: true)
self.navigationItem.setLeftBarButton(item2, animated: true)
self.automaticallyAdjustsScrollViewInsets = false;
self.edgesForExtendedLayout = UIRectEdge.init(rawValue: 0)
}