Potato Hwang
Potato Hwang

Reputation: 309

Using Auto Layout in UITableView, Why is there so much extra space around?

My environment is XCode 6.3, Using the auto layout with UITableView, I always got the extra space between top Navigation and UITableView. have some idea can reduce it ? thank you.

enter image description here

Upvotes: 0

Views: 267

Answers (2)

Burhanuddin Sunelwala
Burhanuddin Sunelwala

Reputation: 5343

You have not added Vertical Spacing for your TableView.

  1. Click on your tableView
  2. Editor > Pin > Top Space to Superview
  3. Click on Attribute Inspector
  4. Set constant to 0.

For your Button to show, remove all the constraints from your button and do the following:

  1. Select your button
  2. Editor > Pin > Leading Space to SuperView
  3. Select your button
  4. Editor > Pin > Top Space to SuperView
  5. Select your button
  6. Editor > Pin > Height
  7. Select your button
  8. Editor > Pin > Width

Upvotes: 1

Sohel L.
Sohel L.

Reputation: 9540

Try to increase your tableview height to 600 and make sure that you set the constraints according to it. It will solve your problem!

Upvotes: 0

Related Questions