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 08-23-2008, 02:01 AM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 39
Question trying to get a view to operate in landscape mode

My whole app is in landscape mode, and I am trying to rotate my view transform so that I can draw with the upper left corner as 0,0. I have it almost working, however there are some fatal flaws and surely someone with better analytic geometry skills than I can straighten me out.

I create a transform and apply it to my view:

Code:
g_landscape_transform = CGAffineTransformMakeRotation(1.57079633);
	g_landscape_transform = CGAffineTransformTranslate (g_landscape_transform, -80.0, +80.0);
	myview = [[LevelView alloc] initWithFrame:applicationFrame viewController:self];
	[myview setTransform:g_landscape_transform];
This transform when applied to the view draws okay. However when I try to respond to touches, the touches don't work on the right side of the screen because when you dump out the values of the the view frame, bounds, and center, you see that the frame is still in portrait mode, along with bounds, and the center is in the old unrotated coordinates.

Well I thought, gee I will just set the bounds and frame to (0, 0, 480, 320), and that should fix things. NOT. after trying to set just bounds, my backgorund shifted over when I drew it, and I can't figure out why setting bounds changes how my stuff is drawn. Surely somebody must know how to set up a view-wide transform that also works with clicks.
ekbart is offline   Reply With Quote
Old 08-23-2008, 05:57 AM   #2 (permalink)
Registered Member
 
Jume's Avatar
 
Join Date: Jul 2008
Location: Slovenia, EU
Posts: 264
Send a message via Skype™ to Jume
Default

Take a look at this thread
Jume is offline   Reply With Quote
Reply

Bookmarks

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: 234
16 members and 218 guests
ADY, Alsahir, cacao, dacapo, Dani77, Desert Diva, djohnson, F_Bryant, HemiMG, jansan, M@realobjects, MarkC, prchn4christ, smethorst, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

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