Need help with interface builder

Discussion in 'iOS Programming' started by na1577, Aug 29, 2014.

  1. na1577 macrumors 6502a

    Jan 20, 2008
    This is my first app, so please be gentle :eek:

    In terms of function, the app is working fine, but I'm having trouble implementing parts of the interface in Xcode. Two issues:

    1) I want to "dock" a part of the interface to the bottom of the screen but I want to keep it positioned there when the device is in landscape mode. The best example I can think of is the iOS camera app, where the controls stay in place but rotate when the device is in landscape. I got it to work at some point, but changed stuff around and I haven't got it to work since. What type of constraints would I need to set for this to work? Is there a better method of doing this than trying to do it in interface builder?

    2) The app is supposed to be a single view application, but I want to have menus slide in and out. For testing purposes, I just have everything sitting on the main storyboard covering the workspace, but I don't know how to make them move. Are they supposed to be on their own storyboards? I'm not really sure what the proper way of doing something like this.

    Any help is appreciated and I'm sorry if these are dumb questions!
  2. PhoneyDeveloper, Aug 30, 2014
    Last edited: Aug 31, 2014

    PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    1) not sure

    2) Moving views on/offscreen is a kind of animation. Simply put, you change the frame of the view from offscreen to onscreen, but instead of this frame change being immediate, it happens gradually. This is easy to implement using UIView animation. Look at this tutorial for some examples of how to do this:
    Use the block based UIView animation methods, not the older methods.
  3. na1577 thread starter macrumors 6502a

    Jan 20, 2008
    Thank you! I'll take a look at this and see if I can figure it out.

Share This Page