Search code examples
swiftxcodeconstraintsactivity-indicator

How to set constraints to an activity indicator that is not part of a tableView but below it


I'm not able to set constraints for an activity indicator below a tableview but not part of the table. enter image description here

I tried to add constraints to the activity indicator but unable to do it. enter image description here

Even when I typed number, Add Constraints button was unable to click.


Solution

  • You don't want a container constraint. Your progress indicator isn't contained by your table view - they are siblings.

    Tap the other button that looks like this:

    enter image description here

    And add a "spacing to nearest neighbor" constraint.