Am o aplicație bazată pe tabbar.
Eu construiesc 2 puncte de vedere, un portret și altul în modul peisaj în interfața Builder.
Acum, vreau ceva de genul iPod App. Vreau vizualizarea peisaj să fie tot ecranul, și ascunde tabbar & bara de stare.
Eu fac să lucreze de bază de acest lucru:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration {
if (self.landscape) {
if (toInterfaceOrientation == UIInterfaceOrientationPortrait)
{
self.view = self.portrait;
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(360));
}
else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft)
{
self.view = self.landscape;
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-90));
}
else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
self.view = self.landscape;
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90));
}
else
{
self.view = self.portrait;
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-180));
}
}
}
Dar toate funcționează dezordonat. Punctul de vedere peisaj nu umple corect zona si comenzile sunt amplasate în locații greșite, ca diferent primul construit în acest sens.
De asemenea, nu am găsit încă o modalitate de a ascunde orice altceva ...













