Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

doesn't understand Autolayout in ios 6

jitendrajitendra Posts: 59New Users @
I am Developing one app in that app store the images but .problem is that when i want to rotate into landscape mode the image still in view where i located uiimageview i want to move uiimageview middle of the screen.

can u give me solution using autolayout.
please help me out this
thanks in advance.

Replies

  • Duncan CDuncan C Posts: 9,116Tutorial Authors, Registered Users @ @ @ @ @ @ @
    Erica Sadun's outstanding "iOS 6 Developer's cookbook" has a very good chapter on Auto layout. I suggest you buy it.
    Regards,
    Duncan C
    WareTo

    widehead.gif
    Animated GIF created with Face Dancer, available for free in the app store.

    I'm available for one-on-one help at CodeMentor
  • GHuebnerGHuebner Posts: 665Registered Users @ @ @
    The chapter on autolayout is really good. Also, the Stanford class reviewed Autolayout during one of the lectures and there were some good tips on autolayout.

    But to answer your question, there is no 'solution' to using autolayout. There is understanding how the constraints work within your view and other objects and how you want your layout to be presented in portrait and landscape. This will be different based on your requirements.

    The only real solution is to understand using constraints and then experience.
  • BrianSlickBrianSlick Treadmill Desk Ninja Posts: 10,692Tutorial Authors, Registered Users @ @ @ @ @ @ @ @
    Or turn off auto layout and use springs and struts.

    Or turn off auto layout and manually relocate the view upon screen rotation.

    Several options.
    Professional iOS App Development. Available for hire.
    BriTer Ideas LLC - WWW | Facebook | Twitter | LinkedIn

    BTIKit | SlickShopper 2 | Leave a PayPal donation
  • RickSDKRickSDK Posts: 1,240Registered Users @ @ @ @
    autolayout is completely useless and should never be used. That's what I think anyways.
  • GHuebnerGHuebner Posts: 665Registered Users @ @ @
    Being that it is iOS6 only, it is useless for anyone targeting iOS5. However, if you are doing a pure iOS6 app, it does some neat tricks (when executed correctly) to handle the different iPhone sizes and also orientation changes. It also does well for handling the sizing of buttons when localization is being used and the length of the words change. When utilized it will assist in supporting more complex user interface layouts and you will not have to write as much code to assure your that your views resize and position themselves correctly as the parent view changes.
  • Duncan CDuncan C Posts: 9,116Tutorial Authors, Registered Users @ @ @ @ @ @ @
    RickSDK said:

    autolayout is completely useless and should never be used. That's what I think anyways.


    It's very cool, and the wave of the future, but only useful if you're targeting iOS >= 6.0, which is not the case yet for many developers (including my company.)
    Regards,
    Duncan C
    WareTo

    widehead.gif
    Animated GIF created with Face Dancer, available for free in the app store.

    I'm available for one-on-one help at CodeMentor
  • jitendrajitendra Posts: 59New Users @
    adding snapshots we all are easily understand my problem now.
    here i am using autolayout but not display proper in landscape mode.
  • givensurgivensur On the Information SuperhighwayPosts: 541Registered Users @ @ @
    You can't upload images directly to these forums, so clicking your thumbnails just brings people to an error page.

    From what I can see, based on the second and third screenshot looking different, it looks like you have an ambiguous layout. When the layout is ambiguous you will get somewhat random results.
    I make cake apps.
  • GHuebnerGHuebner Posts: 665Registered Users @ @ @
    You need to work with the constraints and without seeing those, we really cannot tell what your autolayout should be doing. These formatting issues will be difficult to resolve based on a picture.
Sign In or Register to comment.