Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-15-2010, 09:53 AM   #8 (permalink)
ttefabbob
Registered Member
 
Join Date: Oct 2009
Posts: 2
ttefabbob is on a distinguished road
Default

Quote:
Originally Posted by fiftysixty View Post
Hi,

I just wanted to let you know that I posted a sample XCode project using this code:

fiftysixtysoftware.com Blog Archive UIView PageOpen sample project

Feel free to download the project and use it in your Apps as you wish.
Mikko,
Hello and thanks for your code! I am trying to rotate the button counterclockwise along the y-axis but it doesn't seem to be working... Any idea why? I understand that I should just need to change the sign of the y-axis vector, but it still has not changed direction. Here is my code:

//set the anchor point to the right side of the button(334 is the width)
if (button.layer.anchorPoint.x != 0.0f) {
button.layer.anchorPoint = CGPointMake(1.0f, 0.5f);
button.center = CGPointMake(334.0f, button.center.y);
}


// create an animation to hold the page turning
CABasicAnimation *transformAnimation = [CABasicAnimation animationWithKeyPath:@"transform"];
transformAnimation.removedOnCompletion = NO;
transformAnimation.duration = 1.5f;
transformAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseO ut];
// start the animation from the current state
transformAnimation.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
// this is the basic rotation by 90 degree along the y-axis
CATransform3D endTransform = CATransform3DMakeRotation(3.14, 0.0f, 1.0f, 0.0f);
ttefabbob is offline   Reply With Quote
 

» Advertisements
» Online Users: 330
13 members and 317 guests
ace2011, AdamL, akacaj, baja_yu, bignoggins, deloisig73, Duncan C, Garros1990, HemiMG, hussain1982, ilmman, jbro, mediaspree
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,558
Threads: 94,079
Posts: 402,741
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Garros1990
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:57 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.