Ich möchte meine Bewerbung nur im Querformat in ios machen (sowohl in ios 5 als auch in ios 6)

Ich habe den Xcode 4.5.1 benutzt und benutze diese Bedingungen

#define IOS_OLDER_THAN_6 ( [ [ [ UIDevice currentDevice ] systemVersion ] floatValue ] < 6.0 )
#define IOS_NEWER_OR_EQUAL_TO_6 ( [ [ [ UIDevice currentDevice ] systemVersion ] floatValue ] >= 6.0 )


#ifdef IOS_OLDER_THAN_6
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
    [image_signature setImage:[self resizeImage:image_signature.image]];
    return (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
#endif
#ifdef IOS_NEWER_OR_EQUAL_TO_6
-(BOOL)shouldAutorotate {
    return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
    [image_signature setImage:[self resizeImage:image_signature.image]];
    return UIInterfaceOrientationMaskLandscapeLeft;
}
#endif

Ich habe den Schlüssel in info.plist hinzugefügt.

<key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationLandscapeRight</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
    </array>

Und legen Sie die Ausrichtung der Supportschnittstelle fest

WENN ich den Schlüssel in info.plist hinzugefügt und die Unterstützungsorientierung festgelegt habe und den folgenden Code nicht verwende, funktioniert die Anwendung nicht in ios 5.0

Dieser Code ist Arbeit, aber ich möchte kleine alternative Konzept verwenden .... Bitte helfen Sie mir ..

Danke im Voraus!!

Antworten auf die Frage(4)

Ihre Antwort auf die Frage