Probably something simple, but I can't figure why I cannot resize a UIView in a xib in Interface Builder.
I created a new view XIB in xcode and in the size inspector, the width and height are disabled and grayed out to 320 by 460. This is strange since I can change the size for the other two views (associated with the other two tab bar items).
I am not sure if this has anything to do with but I recently updated the sdk to 3.
Thanks!
Just go to the inspector, go to the first panel (or press command-1) and then change the fields marked Status Bar, Top Bar, and Bottom Bar to None under the section called "Simulated User Interface Elements". You may need to click the little triangle to make them visible.
I've noticed that the UIView automatically created when creating the xib file cannot be resized from the sizing panel or the edge handles.
All I did was to add another UIView and dragged everything from my old UIView to the new one then deleted the old one.
It solved the problem for me but yes, I think there is an underlying issue with the interface builder for Apple to solve (somebody correct me if I'm wrong).
I'm Using XCode 4 integrated Interface builder.
The part that you are looking for is on the first Inspector panel (Command-1). Right at the top there is a section that is labeled Simulated User Interface Elements. By default the Status Bar is on. You need to make sure all three are set to None.
Funny I have a similar problem. I've removed all views from the xib file and re-added a view. Set the status bar to being "unspecified" so that the status bar is not accommodated for. The view, when added, get created with x=0, y=0, w=320 h=460 instead of (0,0,320,480) as I would have expected. After changing the height to 480 and connecting it to file's owner and changing the color to make it distinctive in relation to the background. I fount that there was a white band between the top of the screen and the view. I augmented my code with:
within viewDidLoad
Turns out that the view is as it's loaded from IB is actually (0, 20, 320, 480) As a work around I reset the view's frame with self.view.frame = CGRectMake(0, 0, 320, 480);
I'm using IB 3.2.5
I'd love to know of a little fix for this one.
In order to achieve that in XCode 4.6.3/5.0.2 you need to follow the screenshot below:
Use Auto Layout
Freeform
for SizeThis is needed when creating a headerView for a tableView
I think that you cannot edit the size while simulating any user interface elements such as the status bar in Interface Builder. You could try turning the simulated elements off if any are enabled. Not exactly sure why this is, so would appreciate feedback from anyone who knows why exactly this is - there must be a good reason.