Last active
January 3, 2016 09:59
-
-
Save bjhomer/8446132 to your computer and use it in GitHub Desktop.
Positioning the center of viewB a fraction of the way along viewA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can't do this directly, but it can be done by using a hidden spacer view. (Here, viewC) | |
viewC.left = viewA.left | |
viewC.width = viewA.width * multiplier | |
viewB.centerX = viewC.right | |
Produces this. | |
|----------viewA----------| | |
|-viewC-| | |
|--viewB-| |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment