I am trying to add an activity indicator on top of my table view such that it is appearing in the center of the screen in both portrait and landscape mode.
The activity indicator is placed inside a view which is a subview of the main view. The table view is included via a view container in the main view.
When I click "Add Missing Constraints", the indicator gets a Center Y alignment constraint and a Horizontal space (141) constraint. As expected this makes things look just fine in portrait mode, but in landscape mode the activity indicator appears to the left instead of being horizontally centered.
I have tried to change the Horizontal space constraint to a Center X alignment constraint, but that does not seem to make the situation any better.
Any suggestions?
Here is a close up: