0

I am working on the example from RayWanderLich

I am trying to implement slide panels similar to facebook. I have two panels: center and left and there is a container panel.

enter image description here

enter image description here

When user press the Kitties (top left button) on Center Panel. Left View Controller (i set width as 400 in storyboard, above image) should be slided over the top of Center Panel.

But when i build the app. i can see the Left view width with 400 px. But the Left View Controller fills the entire screen by hiding center panel.

In this image, i set the left view controller color as Green. It overlaps center view controller.

enter image description here

How can i resize the view controller. Or is there any other better way to implement.

What i am trying to accompolish: There are two view controllers. one is center and other is left. when i click on a button in center view, the left view should be slide over on the top of center like in Split View controller.

iPhone Guy
  • 1,285
  • 3
  • 23
  • 34
  • Are you using autolayout? If so, you have to set the constraints properly. – zisoft Nov 20 '14 at 10:51
  • yes. i am using AutoLayout. I have to resize View Controller width. It's default to 768(Portrait). How can i use constraint to View controller – iPhone Guy Nov 20 '14 at 11:00
  • ctrl-drag horizontally on the view, then choose "width". You should read a tutorial on autolayout (also available on Ray Wenderlich's site). – zisoft Nov 20 '14 at 11:03
  • The View Controller (not View) should be resized to specified width. I can resize View but i want to resize View Controller – iPhone Guy Nov 20 '14 at 11:15
  • i added a new image of resizing view controller. Please check it – iPhone Guy Nov 20 '14 at 11:18
  • This Fix my issue. http://stackoverflow.com/questions/9728952/resize-of-uiviewcontroller-in-storyboard – iPhone Guy Nov 20 '14 at 12:01

1 Answers1

0

You can resize the View Controller in Storyboard. Select ViewController->Show Attributes Inspector -> Simulated metrics -> Size -> freeform

Dev
  • 363
  • 2
  • 9