File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 66
66
<autoresizingMask key =" autoresizingMask" flexibleMaxX =" YES" flexibleMaxY =" YES" />
67
67
<color key =" backgroundColor" red =" 0.96142769610000001" green =" 0.19560617421842103" blue =" 0.2744654605526316" alpha =" 1" colorSpace =" custom" customColorSpace =" sRGB" />
68
68
</view >
69
+ <view contentMode =" scaleToFill" id =" uDJ-7O-6n6" >
70
+ <rect key =" frame" x =" 244" y =" 86" width =" 60" height =" 60" />
71
+ <autoresizingMask key =" autoresizingMask" flexibleMaxX =" YES" flexibleMaxY =" YES" />
72
+ <color key =" backgroundColor" red =" 0.40933579642894741" green =" 0.80104922520526145" blue =" 0.036929481934210528" alpha =" 1" colorSpace =" custom" customColorSpace =" sRGB" />
73
+ </view >
69
74
</subviews >
70
75
<color key =" backgroundColor" white =" 1" alpha =" 1" colorSpace =" calibratedWhite" />
71
76
</view >
72
77
<navigationItem key =" navigationItem" id =" cGh-aI-gZo" />
73
78
<connections >
74
79
<outlet property =" blueSquare" destination =" azk-Fu-KuD" id =" GHY-Yf-xjc" />
80
+ <outlet property =" greenSquare" destination =" uDJ-7O-6n6" id =" 9hC-l4-Vhd" />
75
81
<outlet property =" redSquare" destination =" qDn-u2-IJk" id =" VpL-zc-ufr" />
76
82
</connections >
77
83
</viewController >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import UIKit
11
11
class PositionViewController : UIViewController {
12
12
@IBOutlet weak var blueSquare : UIView !
13
13
@IBOutlet weak var redSquare : UIView !
14
+ @IBOutlet weak var greenSquare : UIView !
14
15
15
16
override func viewDidLoad( ) {
16
17
super. viewDidLoad ( )
@@ -34,6 +35,9 @@ class PositionViewController: UIViewController {
34
35
UIView . animateWithDuration ( 1 , animations: {
35
36
self . blueSquare. center. x = self . view. bounds. width - self . blueSquare. center. x
36
37
self . redSquare. center. y = self . view. bounds. height - self . redSquare. center. y
38
+
39
+ self . greenSquare. center. x = self . view. bounds. width - self . greenSquare. center. x
40
+ self . greenSquare. center. y = self . view. bounds. height - self . greenSquare. center. y
37
41
// <_UIViewAdditiveAnimationAction: 0x7fe17b70df30>
38
42
// println(self.view.actionForLayer(self.view.layer, forKey: "position"))
39
43
} )
You can’t perform that action at this time.
0 commit comments