Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Camera Orientation

Hello,

I am trying to have an app that is completely in landscape mode that also uses the Camera. Having the app in landscape doesn't seem to be a problem since I set the Ti.Ui to landscape. However, when the Camera starts up it will first rotate the view to portrait and the pictures are saved in Portrait. Is there a way to keep the camera in landscape mode?

Thanks for the help.
Mike

— asked August 23rd 2010 by Michael Craig
  • camera
  • iphone
  • landscape
  • orientation
0 Comments

1 Answer

  • The camera works only in portrait mode, which is to the say the toolbar is always by the home button. However, you may notice that the camera icon in the button rotates to match a landscape orientation.

    If the camera is returning an image that you need rotated 90 degrees, apply a transform to the ImageView:

    var imageView = Ti.UI.createImageView({
        ...,
        transform: Ti.UI.create2DMatrix().rotate(90)
    })
    
    — answered October 21st 2010 by Justin Johnson
    permalink
    1 Comment
    • I am doing something that has nothing to do with this, but that is genius, thank you ;)

      — commented October 21st 2010 by Colton Arabsky
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.