I am using storyboard in an iOS/xcode project with the following simplified "hierarchy" (from top to bottom):
- ViewController (not a TableViewController for some customizing reasons)
- View
- TableView (and some other content that does not matter I think)
- Cell
- ContentView
- "AnyView" (specific type seems to be irrelevant, as the following happens for every item I tried)
When I set the constraints between AnyView and ContentView to Zero Spacing for Top/Bottom/Leading/Trailing there is still quite some "space" between the ContentView and AnyView. (I have never encountered this when doing similar things just programmatically.)
In order to get rid of that spacing I looked for everything in storyboard options that sounded even remotely like spacing / intending etc., but did not really succeed.
By accident I just realized that when I drag & drop a view into the ContentView in a certain way it appears that storyboard sets a negative spacing of -8 that seems to "remove" that spacing. I could just use that number in my constraints, but it seems somewhat random. Does anyone know what the reason for my unwanted spacing might be or if that -8 has a deeper meaning (e.g. maybe Apple is forcing some design guidelines onto storyboard users that way?)?
Thank you very much for any insights!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…