How do I change the preview device in Xcode storyboard?
Asked Answered
W

5

7

As you can see from the below image

enter image description here

The storyboard preview is of some tablet device, I need to change this to the latest iphone or iphone 4s, how can I do this? Also I know about the assistant editor and how to preview on multiple devices using the assistant editor, thats not what I want, I want to change the preview in the story board itself

Wilkes answered 5/4, 2016 at 5:59 Comment(5)
It's size classes enabled storyboard 600x600 pixel output. It's not tablet.Undesigned
Disable size class give u iphone or ipad size, but if u'r design for both then change the w Any h Any below storyboard. For preview then open assistant editor , click manual or automatic then choose preview -> your storyboardMargret
its called size not preview. Your question is not clear with your actul need be more clearBidden
@NitinGohel My question is clear to the best of my knowledge, I do not know the proper jargons, I don't have a teacher, I'm learning by myself, I thought stackoverflow was here to help remove ignorances about topics, If i had known you Xcode called them sizes and not previews (which is very misleading for a first time user) I wouldn't be asking this question now would I?Wilkes
i just telling you what does it called to be. nothings else lolBidden
T
4

Try this:

Select view controller > click on attribute inspector > select size you want.

enter image description here

Tingey answered 5/4, 2016 at 6:5 Comment(1)
@Wilkes Happiee coding :)Tingey
W
13

You need to follow four steps.

  1. Press Cmd + Alt + Enter(return). It will show two window.
  2. Click on 'Manual' text. It will show menu with Last option as 'Preview'.
  3. Select it.

enter image description here

4.Select device type from bottom '+' button into which you want to see preview. enter image description here

Whim answered 5/4, 2016 at 6:10 Comment(2)
hmm I already know this, I mentioned it in the question that I don't want to see the assistant editor previewsWilkes
Is it still valid on XCode 14? I'm having hard time finding it.Hackneyed
C
12

In Xcode 9.2, simply go to your Storyboard and go to the bottom, Click View As and choose a device you like. enter image description here

Chamaeleon answered 12/3, 2018 at 22:1 Comment(0)
T
4

Try this:

Select view controller > click on attribute inspector > select size you want.

enter image description here

Tingey answered 5/4, 2016 at 6:5 Comment(1)
@Wilkes Happiee coding :)Tingey
B
1

image for help

select any viewController and then in attributes inspector tab you can change size.

Bolduc answered 5/4, 2016 at 6:6 Comment(0)
D
0

You can open the utilities view and select the simulated size for the view controller

Utitilities View

Demonstrative answered 5/4, 2016 at 6:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.