I am trying to eliminate all warnings in my app to update it to the App Store. Warnings are deceptive because while they do not appear on one iPhone model, warnings can pop up when viewed on another iPhone model.
I have a label and a textField on the same line. The label contains “Food & Drink”. The textField is wide enough to contain “9,999,999.99”, if necessary. It simply holds a user entered currency string.
This app is portrait, iPhone only.
Details
The label is anchored to the left view safe margin edge. The textField is anchored to the right side of view. I set my AutoLayout constraints like this because I always want the label anchored to the left-side of the view and I want the textField anchored to the right-side. When the user enters her currercy data the numerals appear right to left.
Warnings
The app generates no warnings when viewed on all iPhones in the simulator except the iPhone SE . When the App is run on the SE, the label and the textField overlap each other. (I deliberately did not connect these views together because I feared doing so would create problems.)
So with neither view having any constraints between themselves, the warning I get is:
“Trailing constraint is missing, which may cause overlapping with other views.” This is in reference to the label. Oddly, the textField does not generate a " Leading … " warning.
If I connect the label to the textField, the warning goes away, but the overlapping behavior remains. ( I control-clicked from the label to the textField and selected “Horizontal spacing”.)
An ideal solution to this issue could be that both label and textField would compress equally so that both would be visible - not overlapped, on the SE. With the font size automatically downsized to fit the SE view this would work. This solution smells a lot like a autolayout coding solution and not so much of IB autolayout fix. I could be wrong.
Any help would be greatly appreciated.