Thursday 30 March 2017

Remove empty space before cells in UITableView



how to remove empty space before cell


a) Programmatically

Add this to i.e. viewDidLoad

self.automaticallyAdjustsScrollViewInsets = false
b) Interface Builder



  • Select the view controller
  • Open Attributes inspector
There's a property called "Adjust scroll view insets" in IB's attribute inspector (when a view controller is selected) which is on by default. just deselect the check box


No comments:

Post a Comment

Remove bottom line in navigation bar

navigationController ?. navigationBar . setBackgroundImage ( UIImage (), for: . any , barMetrics: . default )          navigat...