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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-01-2010, 11:01 PM   #1 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 5
mofle is on a distinguished road
Question Rotation problem

I have some issues when rotating the device.
Stretched text in the tablerows after rotating the device and a weird animation when first clicking a tablerow and then going back in landscape view.


I'm using custom tablerows which
Code:
[super setNeedsDisplay];
[contentView setNeedsDisplay];
to update the tablerow. this is in it's own class. if i comment them, the tablerows doesn't update when the app starts, so i think i need to activate them in this function:
Code:
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {          
     NSLog(@"rotation");
}
but i don't know how to reference a function in another class.



Here is the project: http://drop.io/43cjvb3


Can someone help me out?



Screenshot of the problem

Last edited by mofle; 05-02-2010 at 03:18 PM.
mofle is offline   Reply With Quote
Old 05-02-2010, 02:13 AM   #2 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 56
aloew is on a distinguished road
Default

In my App (Personal Photo Clock) I do a manual layout of the digits in the main view by setting new positions and sizes.
This happens in a selector called layoutSubviews works great and you can even add or remove elements (I add reflections to the digits in landscape mode.)

Automatic layout should work too, there is an example app in the SDK resources... I don't remember the name, sorry. It had 2 boxes which aligned to orientation changes.
__________________
TexturePacker - the best sprite sheet maker
PhysicsEditor - editor for box2d and chipmunk collision shapes
aloew is offline   Reply With Quote
Old 05-06-2010, 12:52 PM   #3 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 5
mofle is on a distinguished road
Question

Anyone else?
mofle is offline   Reply With Quote
Old 05-06-2010, 01:07 PM   #4 (permalink)
Registered Member
 
OurMountainofIdeas's Avatar
 
Join Date: Mar 2010
Posts: 56
OurMountainofIdeas is on a distinguished road
Default

Do you have the various aspects of the UI set as "stretch to fit" or something similar in IB? That's what the screenshot makes it look like.

Also, I have to say - that font used at the top looks great, as do the color choices!
__________________
OurMountainofIdeas is offline   Reply With Quote
Old 05-06-2010, 03:15 PM   #5 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 5
mofle is on a distinguished road
Default

I'm not using IB, so I can't be sure, the problem isn't the stretching, but that it doesn't update the text to the new rotation, if I scroll the stretching goes away. So what I really need, I way to force redraw the tablerows on rotation, but I haven't been able to do so yet...

Any ideas?
mofle is offline   Reply With Quote
Reply

Bookmarks

Tags
landscape, rotation

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: 332
20 members and 312 guests
Abidullah, baja_yu, cgokey, Domele, Duncan C, Fstuff, gbenna, givensur, guusleijsten, HowEver, iphonedevshani, jbro, mdpauley, n00b, newDev, seokwon lee, SLIC, stanny, Steven.C, WheyLabs
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,113
Posts: 402,877
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

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