How to add initial view to Storyboard file?
Asked Answered
N

4

15

I started an "Empty Application" template, this means that I had to add my own storyboard file. Problem is, it is completely blank, and I can't figure out how to get the first view on there, so I can start designing my interface.

Anyone know how to get that first view on there?

Neveda answered 24/11, 2011 at 4:1 Comment(1)
It's insane that we have to look up this kind of basic, basic functionality. WTF, Apple?Refined
F
15

When you create a new Storyboard file, all you need to do is click/drag the UIViewController object from your right hand side of tools into your Storyboard and then you're all set to begin work on your new Storyboard.

Flex answered 24/11, 2011 at 4:6 Comment(2)
What is "the UIViewController object from your right hand side of tools"? My files, including UIViewController files, are listed on the left, and I'm pretty sure that's normal.Refined
This was a number of years ago, but the right hand pane I was referring to back then was the UI component list in Xcode that allowed you to add to UI elements to your storyboard (UIView, UILabel, etc etc).Flex
E
11

Just in case you can not start from scratch :

  • Select your View Controller
  • Open the Attribute inspector (right pan by default)
  • Go to View Controller section
  • Select Is Initial View Controller checkmark of the Initial Scene option

enter image description here

Epsomite answered 4/1, 2012 at 20:22 Comment(0)
R
6

In the latest version of Xcode (12.2), this is how you can add initial view to story board

enter image description here

Click on + Icon,

enter image description here

search "View Controller", Drag and drop View Controller.

Rumney answered 6/12, 2020 at 16:54 Comment(3)
I don't get it. Drag and drop from the Objects library does absolutely nothing for me - I've got one existing scene, and when I try to drop an object on the canvas next to it, it just doesn't work. Any idea what I might be doing wrong ?Blanka
Just tried, it works for me. Can you share some screenshots?Rumney
holy ****, the + iconColumbarium
A
0

Go to Edit->Show Library then drag and drop a type of View Controller that you need.

Annieannihilate answered 20/11, 2020 at 20:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.