Permalink
Browse files

Added animation to logo at launch

  • Loading branch information...
1 parent 5a15051 commit 571744226da2f1c93aced57bee63b08389dc7c75 @onedayitwillmake onedayitwillmake committed May 4, 2012
@@ -9,5 +9,6 @@
#import <UIKit/UIKit.h>
@interface BLKViewController : UIViewController
+@property (weak, nonatomic) IBOutlet UIImageView *markLogo;
@end
@@ -9,6 +9,7 @@
#import "BLKViewController.h"
@implementation BLKViewController
+@synthesize markLogo;
- (void)didReceiveMemoryWarning
{
@@ -27,13 +28,31 @@ - (void)viewDidLoad
- (void)viewDidUnload
{
+ [self setMarkLogo:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
-- (void)viewWillAppear:(BOOL)animated
-{
+- (void)viewWillAppear:(BOOL)animated {
+ // Animate
+ CGRect endFrame = markLogo.frame;
+ CGRect startFrame = endFrame;
+ startFrame.origin.x -= startFrame.size.width;
+ startFrame.size.width = startFrame.size.width * 3;
+ startFrame.size.height = startFrame.size.height * 3;
+ markLogo.frame = startFrame;
+ markLogo.alpha = 0;
+
+ [UIView beginAnimations: nil context: nil];
+ [UIView setAnimationDuration: 0.5];
+ [UIView setAnimationDelay: 1];
+ [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
+ markLogo.frame = endFrame;
+ markLogo.alpha = 1;
+ [UIView commitAnimations];
+
+
self.navigationController.navigationBar.hidden = YES;
[super viewWillAppear:animated];
}
@@ -119,8 +119,7 @@ -(void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)annotationV
// Animate
CGRect endFrame = view.frame;
CGRect startFrame = endFrame;
- startFrame.origin.x = view.center.x;
- startFrame.origin.y += 10;
+ startFrame.origin.y += 20;
startFrame.size.width = 0;
startFrame.size.height = 0;
// view.frame = startFrame;
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2182" systemVersion="11D50b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="I26-E1-YgT">
<dependencies>
+ <deployment defaultVersion="1296" identifier="iOS"/>
<development defaultVersion="4200" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1181"/>
</dependencies>
@@ -51,22 +52,25 @@
<rect key="frame" x="23" y="129" width="274" height="106"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
- <imageView userInteractionEnabled="NO" contentMode="center" image="lockstamp.png" id="cQt-Ms-Vzm">
- <rect key="frame" x="66" y="20" width="189" height="106"/>
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="lockstamp.png" id="cQt-Ms-Vzm">
+ <rect key="frame" x="111" y="44" width="98" height="68"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Register" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="RCq-w3-AAU">
<rect key="frame" x="31" y="419" width="266" height="39"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="12"/>
- <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="16"/>
+ <color key="textColor" white="0.25" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" title="start" id="G7a-xb-y1P"/>
<nil key="simulatedTopBarMetrics"/>
+ <connections>
+ <outlet property="markLogo" destination="cQt-Ms-Vzm" id="rLJ-xe-ygV"/>
+ </connections>
</viewController>
</objects>
<point key="canvasLocation" x="574" y="-209"/>
@@ -286,6 +290,9 @@
</class>
<class className="BLKViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/BLKViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="markLogo" candidateClass="UIImageView"/>
+ </relationships>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">

0 comments on commit 5717442

Please sign in to comment.