You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Alternate edges. Their names may change in the near future.
111
+
var top2: CGFloat
112
+
var right2: CGFloat
113
+
var bottom2: CGFloat
114
+
var left2: CGFloat
53
115
```
54
116
117
+
The difference between alternate edges and normal edges require a bit of explaining. Imagine we have a view at position (0, 0) ofsize (100, 100) named *myView*. If we do `myView.right=200`, then its position isnow (200, 0) and its size remains unchaged. However, back when our view was located at (0, 0), if we had done `myView.right2 =200`, then *myView* would have still been at (0, 0) but would have had a size of (200, 0).
118
+
119
+
So basically, *setting a normal edge's position drags the whole view along with that edge but setting an alternative edge's position drags just that edge*. And don't worry if you, for example, try to drag a left edge past its view's right edge. Edge swapping is done automatically so you don't have to worry about.
120
+
55
121
###CALayer/UIView Methods
56
122
57
123
Replace the word "layer" with "view"for the UIView methods.
0 commit comments