Skip to content

Instantly share code, notes, and snippets.

@xieweizhi
Forked from albertodebortoli/bookCoverOpen.m
Created September 30, 2015 08:40
Show Gist options
  • Save xieweizhi/06bac099d8de6bae47d3 to your computer and use it in GitHub Desktop.
Save xieweizhi/06bac099d8de6bae47d3 to your computer and use it in GitHub Desktop.

Revisions

  1. @albertodebortoli albertodebortoli revised this gist May 19, 2012. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions bookCoverOpen.m
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,10 @@
    #import <QuartzCore/QuartzCore.h>

    UIImageView *splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)];
    splashView.image = [UIImage imageNamed:@"Default.png"];
    [self.window addSubview:splashView];
    [self.window bringSubviewToFront:splashView];

    splashView.layer.anchorPoint=CGPointMake(0, .5);
    splashView.center = CGPointMake(splashView.center.x - splashView.bounds.size.width/2.0f, splashView.center.y);
    [UIView beginAnimations:nil context:nil];
  2. @albertodebortoli albertodebortoli created this gist Mar 9, 2012.
    14 changes: 14 additions & 0 deletions bookCoverOpen.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #import <QuartzCore/QuartzCore.h>

    splashView.layer.anchorPoint=CGPointMake(0, .5);
    splashView.center = CGPointMake(splashView.center.x - splashView.bounds.size.width/2.0f, splashView.center.y);
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:1];
    [UIView setAnimationDelay:1];
    splashView.transform = CGAffineTransformMakeTranslation(0,0);
    CATransform3D _3Dt = CATransform3DIdentity;
    _3Dt =CATransform3DMakeRotation(3.141f/2.0f,0.0f,-1.0f,0.0f);
    _3Dt.m34 = 0.001f;
    _3Dt.m14 = -0.0015f;
    splashView.layer.transform =_3Dt;
    [UIView commitAnimations];