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)initWithNibName
NSString *)nibNameOrNil bundle
NSBundle *)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)shouldAutorotateToInterfaceOrientation

UIIn 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