I ran into this really frustrating issue today.
I want to set my view to be autosizing like this:
But all I find in my xcode settings for an NSView is like this:
The two screenshots are taken from two different projects with the same xcode 4.3.2. Is this a bug or am I missing something?
Thanks.
Starting in Xcode 4.3 the xib files for Cocoa projects have auto layout turned on initially. When a xib file uses auto layout, there is no Autosizing section in the size inspector.
If you want to turn off auto layout, open the file inspector and deselect the Use Auto Layout checkbox.
Seaid's solution works. but i think it's bug because the auto sizing tool will apear about half a second when switching to another inspector.
Xcode 4 interface-builder problems
Related
Options Window
How can I connect a label, button, or other element from my Storyboard to my coding file in Xcode 13? When I first loaded Xcode, there was no storyboard file added to my project. I had to add one myself. Then, when I created labels and buttons on the Storyboard, it wouldn't allow me to connect to the coding file the way I used to (clicking Ctrl and dragging the label/button to the code). I feel like I'm missing something simple but I can't find any solutions online. Thanks in advance.
You have selected a Multiplatform template. This is only supported by SwiftUI.
Select a single platform template (iOS, macOS etc)
In previous versions of Xcode, I was able to just open the storyboard and click almost anywhere, and in the file inspector, there was a button to disable auto layout. It seems like that's not an option anymore? Am I being forced to use auto layout now?
According Apple forum this option silently disappeared in Xcode 11.
You can still do it programmatically at viewDidLoad
for constraint in self.view.constraints {
constraint.isActive = false
}
Select your view in the storyboard and enable/disable LAYOUT automatic option in the right section
In Interface Builder, highlight the constraint(s) on the left side and uncheck "Installed" in the Attributes Inspector
I duplicated a storyboard, and changed colors is all. What do I need to do to link my ViewController to use this other storyboard? thank you.
Select your project folder in the navigation window. Under the Deployment Info section, click on the "Main Interface" text field and select your alternate storyboard. This will set it as the initial interface at launch time. If you want to switch between the storyboards while the application is running, that's a little more complicated and not something I've had to figure out yet.
I see no settings at all under Size Inspector in Interface Builder, it is completely blank for my View, all labels and all buttons. I am using xcode 4.6 and have 'Use Autolayout' unchecked and the metrics (Size, Status Bar, Top Bar, Bottom Bar) are all 'None'. I need to be able to control the autoresizingmask, but why can't I see any size properties?
Once you switch to Size Inspector tab, directly under the icon there is a little header that says "View." If you hover over that some text appears that says "Show," because apparently that section can collapse down. Clicking the header should cause the options you expect to appear.
I wish they would make this more clear, because I completely missed it as well, and restarted Xcode several times.
I ran into this problem using Xcode 5.0 but upon further investigation, discovered the dysfunction ran to a higher degree - all Inspector views in Xcode were blank for every control, and the Navigator buttons didn't work either.
The culprit seems to have been a conflict in versioning. When I re-checked out trunk, Xcode returned to expected behavior.
Resizing the Xcode window made things right again for me - go figure.
This worked for me......
Clear Menu -> Recent Files
i cleared last open storyboard from Recent files
Restart Xcode
I'm trying to update an IOS app for IOS6 and iPhone 5, but I have a problem resizing some views from the main Storyboard.
When I click on the new "Apply Retina 4 Form Factor" button, some of the views included in the StoryBoard don´t resize. I´ve checked all the settings for every Scene and seem to be configured in the same way. Any idea? Thanks in advance.
You might have found your solution but I just had a similar problem. For future notice, I found the fix was in the show size inspector and instead of using layout rectangle, I used frame rectangle.
I was having the same problem, this answer worked for me and finally removed the letterbox:
https://stackoverflow.com/a/12927282/539149
So add a 640x1136 launch image called Default-568h#2x.png and set the "Retina (4-inch)" target setting to it. More info for the other sizes here:
http://www.idev101.com/code/User_Interface/launchImages.html
Just in case it helps others, I had tried these links and none of them got rid of the letterbox, but they did at least enable the resize masks:
Resize of UIViewController in storyboard
Xcode 4.5: can't set root view autoresizingMask in Interface Builder
how do you resize (visually, not programmatically) the detail view of a UISplitViewController in a storyboard?
iphone 5 and storyboard setting autoresizing masks