-->

Xcode: Autosizing preview window missing

2019-02-19 18:40发布

问题:

I am learning iOS and using Apress - Beggining iOS 5 development book. The book says there is a window to preview UI elements's autosizing behaviour in size inspector as:

but I can not see such a window. After searching in Xcode windows I realized that that windows actually appearing in a very short time period while switching size inspector to any other section in utilities tab. How can I make it constanly appear?

回答1:

I have found the answer here Xcode 4.3 not presenting Autoresizing panel in Size Inspector Just uncheck "Use Auto Layout" option on file inspector tab:



回答2:

While you are editing XIB or storyboard file. You can see "Size Inspector" tab panel at right menu. It has a ruler icon.

But the view -that you want to set it's layout- must be selected. At this sample on screenshot, a Label (text:social) is selected.



回答3:

This tutorial can help to your problem.

http://msmvps.com/blogs/kevinmcneish/archive/2012/12/10/tutorial-ios-6-auto-layout-versus-springs-and-struts.aspx