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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-28-2008, 03:43 AM   #1 (permalink)
New Member
 
Join Date: Oct 2008
Posts: 1
Default UIImageView will not rotate about y-axis and x-axis

A seemingly simple task: rotate an image about the y-axis.

The problem: only half the image will rotate.

(Note: The z-axis works fine. It's the y-axis and x-axis where there is some issue about rotating in 3D space that is causing issues.)

I was trying to avoid Core Graphics, because I'm fairly new to OpenGL.

Code:
CABasicAnimation *rotateAnimation = [CABasicAnimation animation];
	rotateAnimation.keyPath = @"transform.rotation.z";
	rotateAnimation.fromValue = [NSNumber numberWithFloat:DegreesToRadians(0)];
	rotateAnimation.toValue = [NSNumber numberWithFloat:DegreesToRadians(360)];
	rotateAnimation.duration = 10;
	rotateAnimation.removedOnCompletion = NO;
	// leaves presentation layer in final state; preventing snap-back to original state
	rotateAnimation.fillMode = kCAFillModeForwards;
	rotateAnimation.repeatCount = 99;
	rotateAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
	
	// add the animation to the selection layer. This causes it to begin animating
	[imageView.layer addAnimation:rotateAnimation forKey:@"rotateAnimation"];
brentd49 is offline   Reply With Quote
Reply

Bookmarks

Tags
animation, core graphics, image, quartz, uiimageview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 236
15 members and 221 guests
ADY, AragornSG, Dani77, Dattee, Duncan C, fkmtc, HDshot, HemiMG, Promo Dispenser, Punkjumper, Rudy, sacha1996, sneaky, spiderguy84, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,231
Posts: 380,768
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:16 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0