Skip to content

Commit

Permalink
исправил движение цветного квадрата
Browse files Browse the repository at this point in the history
  • Loading branch information
zapsleep committed Jan 17, 2013
1 parent 3b0e172 commit 6721dac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Binary file not shown.
4 changes: 4 additions & 0 deletions BlurTest/DVTestViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,12 @@ - (void)timerAction
static int xColorSquareDirection = 4;
static int yColorSquareDirection = -4;

[CATransaction begin];
[CATransaction setValue:@(0.f)
forKey:kCATransactionAnimationDuration];
self.colorSquare.position = CGPointMake(self.colorSquare.position.x + xColorSquareDirection,
self.colorSquare.position.y + yColorSquareDirection);
[CATransaction commit];
if (self.colorSquare.position.x < 0 || self.colorSquare.position.x > self.backingView.bounds.size.width) {
xColorSquareDirection *= -1;
}
Expand Down
7 changes: 4 additions & 3 deletions BlurTest/DVTestViewController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.SystemVersion">11G63</string>
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
<string key="IBDocument.AppKitVersion">1138.51</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">1930</string>
Expand Down Expand Up @@ -66,6 +66,7 @@
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIImageView" id="422244082">
Expand Down

0 comments on commit 6721dac

Please sign in to comment.