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 06-15-2009, 12:46 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 15
Question Customized Rotation for UIImageView objects

Hi everyone,

I'm looking for a way to smoothly rotate an image object on screen.
(Note: NOT to straight away rotate by 90 degrees, but to give the option to fully rotate 360 degrees and be able to stop anywhere)

To get a better idea of what I'm saying, check out this app; YouTube - Funny Face - review iPhone Application - Customize Your Photo in a way you like. What I'm trying to do is basically the same thing as this app, but for tshirt designing, i.e. to take various small patterns, place them on a tshirt template while having the option to resize+rotate them.

I'm open to hear of anyway this can be done... looked around, but havent found any sample code relating to this..

Thanks!
MGunetileke is offline   Reply With Quote
Old 06-15-2009, 12:51 AM   #2 (permalink)
Dr. Touch Cocoa Helpdesk
iPhone Dev SDK Supporter
 
Join Date: Sep 2008
Location: Vienna, Austria
Posts: 537
Send a message via AIM to Oliver Drobnik Send a message via MSN to Oliver Drobnik Send a message via Skype™ to Oliver Drobnik
Default

Quote:
Originally Posted by MGunetileke View Post
Hi everyone,

I'm looking for a way to smoothly rotate an image object on screen.
(Note: NOT to straight away rotate by 90 degrees, but to give the option to fully rotate 360 degrees and be able to stop anywhere)

To get a better idea of what I'm saying, check out this app; YouTube - Funny Face - review iPhone Application - Customize Your Photo in a way you like. What I'm trying to do is basically the same thing as this app, but for tshirt designing, i.e. to take various small patterns, place them on a tshirt template while having the option to resize+rotate them.

I'm open to hear of anyway this can be done... looked around, but havent found any sample code relating to this..

Thanks!
You can rotate and scale how an image is displayed by applying an affine transform to it. This does not change the image itself, but how it is shown.
__________________
regards

Oliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.

Linguan – makes localizing strings file fun!

Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
Oliver Drobnik is offline   Reply With Quote
Old 06-19-2009, 07:32 AM   #3 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 15
Default

Thanks a lot Oliver!... that does indeed solve my problem to a certain degree.

But with the Affine Transform applied, I found that you cannot zoom in out of the rotated image (it results in some very weird transformations). I presume it is because as you said the Affine Transform changes how the image is displayed and not the image itself.

So, 2 questions here if I may;

1 - Is there any way to make the change by Affine transform permanent?
(change the image itself, not just how it is shown)

2 - Any other way to make such rotations?


Thanks again!!
MGunetileke is offline   Reply With Quote
Reply

Bookmarks

Tags
rotate, touch, uiimageview interaction

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: 250
24 members and 226 guests
ADY, bookesp, chillyh, ckgni, dacapo, Dani77, Davey555, Desert Diva, Dominus, glenn_sayers, HemiMG, JasonR, LEARN2MAKE, M.A.S., marshusensei, mer10, nobre84, prchn4christ, Raggou, Rudy, ryantcb, themathminister, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,765
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 02:35 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0