I'm trying to find out how to calculate the actual left margin in my Today extension main view to align the contents to the rest of the Today view.
Here's a screenshot of the Today extension (green = my extension's main view) using iPhone 6 Plus simulator in both portrait and landscape mode:
The red dashed line in the screenshots illustrates the line I'm trying to align the red and blue UILabels to. It seems that the red line - main views left border alignment is different in each device: iPhone 5x, iPhone 6 and iPads.
Currently, the main view gets resized by iOS to the maximum width, and both the UILabels are attached with self.view.layoutMargin = UIEdgeInsetsZero to the left border.
It seems that the UIViews layoutMargin isn't the solution here, the values seem to be the default UIView values (8 pixels all edges).
How do I align the two UILabels to the dashed line?
Aucun commentaire:
Enregistrer un commentaire