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 09-10-2009, 11:23 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 24
kemaltolga is on a distinguished road
Default TabViewController orientation change does not reload view

Hi:

I am new to iphone development. I am following a tutorial which strictly uses code to build the interface, not "Interface Builder". So, I am in the process of building a very simple application with a tab control (2 tabs).

The appdelegate instantiates a custom class implementing from UITabBarControl. On the init method of this custom class I instantiate 2 viewcontrollers, set the self.viewControllers and so on...view code below

- (id)initWithNibNameNSString *)nibNameOrNil bundleNSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
chordsViewController = [[ChordsViewController alloc]
initWithMessage:@"Chords"];
licksViewController = [[LicksViewController alloc]
initWithMessage:@"Licks"];
self.viewControllers = [NSArray arrayWithObjects:
chordsViewController,
licksViewController,
nil];

self.selectedViewController = chordsViewController;
}
return self;
}


Then I am overriding this method...
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientationUIIn terfaceOrientation)interfaceOrientation {
return YES;
}

In short...the rotation works correctly. The TabViewControl changes orientation, however, a messages drawn by a simple view instantiated on the loadview method of either of the viewcontrollers looks distorted on "landscape". I know it has to do with the fact that the string message is not re-drawn on the orientation change. How can I fix this?

Thanks

--tolga
kemaltolga is offline   Reply With Quote
Reply

Bookmarks

Tags
orientation, uitabbarcontroller

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: 338
11 members and 327 guests
givensur, glenn_sayers, guusleijsten, ipodphone, jbro, mediaspree, mottdog, mtl_tech_guy, Punkjumper, vilisei, whitey99
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,114
Posts: 402,883
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

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