2

My iOS application should run in portrait and upside down mode.

In a view controller, I've defined an IBAction that launch SLComposeViewController in this way

-(IBAction) shareOnFacebook {
    if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {


        SLComposeViewController *vc = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];


        [vc setInitialText:[_myObject generateSocialMessage]];
        [vc addURL:[_myObject generateUrl]];

        [self presentViewController:vc animated:YES completion:nil];

    } }

In fact the IBAction works great in portrait mode.

My problem appear when the app run in upside down mode. The view reverses himself (and goes in a mode "inversed portrait") and presents the controller. That means the view is inverted, the keyboard at top and the social view at the bottom.

Any idea ?

j_freyre
  • 4,623
  • 2
  • 30
  • 47

0 Answers0