How do i get to the subviews of UITabBar in XCode 4 - interface-builder

(The videos/tutorials I have seen for XCode 3* doesn't help me).
I am talking about the view view-controllers associated with each tab-button.
Olav

Related

How to set correct view hierarchy in Xcode 7?

Simple problem but can't find the answer.
In xcode, I have set up a simple UIView with dark background color and on this UIView I have put an UILabel. When I run the app, the label is not shown. Debugging the view hierarchy shows me that for some reason, the UIView is displayed in front of the UILabel.
How can I set the UILabel in front of the UIView? I remember encountering the same problem in XCode 6 and was able to bring the UILabel to front but can't now find any advice on how to do this on XCode 7.
Thanks in advance!
After 3 hours of surfing the net I figured this out (5 min after posting this question...)
In Xcode, select main storyboard -> view controller scene. There under view you see all and indextree with the UIViews and UILabels you have set up. On the list, first items get apparently drawn first and the last items last. All I had to do is move my UIView above the UILabel in the list and problems sorted itself out.

Xcode 5, ios screen issue

when I open my iOS project in Xcode 5, I see spaces bottom and top of the view controls (in 3.5 and 4 inch screens).
There are no problem in Xcode 4. Image view is not covering all view controls area.
I am setting image view size with manually but I have 200+ view control.
How can i quickly fix ?
Have you tried to hide status bar ?
It can cause the issue you are having
If the spaces are only appearing in Interface Builder, you can tell IB what you want to see during layout. Click below a scene on the bar where the controller, first responder, files owner etc. are located. Now your whole scene is selected. Then show the attribute insepctor (Cmd+Alt+4) and select what you want to see in your scene.
Attention - this has nothing to do with your code! Its just how the scene is presented in the editor (simulated metrics)!
If this was your problem, please mark question solved.
If not, please add some more details.
Thanks.

Xcode 5, storyboard update image position issues

When I open up my Xcode 4.x project in Xcode 5 and load a Storyboard some strange things are occurring. Mainly, some of my images are getting re-sized and positioned. The size always gets set to 0,0 and the position is somewhere WAY off screen. Values like -3007,12824. This is an app with a massive amount of storyboard layout and while it hasn't messed with all the images, there are easily 500+ that have this problem.
for example this
<rect key="frame" x="403" y="134" width="572" height="486"/>
changed to
<rect key="frame" x="-815" y="1490" width="0.0" height="0.0"/>
I've tried setting the storyboard to Xcode 4.6 version, but no effect. Anyone know why this is happening and how to prevent it (short of manually discarding all the changes I don't want)?
edit: I am using the GM Seed for Xcode 5.
I found this post on the Apple Developer forums which seems to imply this is a bug. I've submitted the appropriate radars to Apple to help the find the root cause (as they've suggested).
In the meantime, I have a simple process for converting my storyboard.
Open them in Xcode 5.
Say I want to commit the changes (we all use source control, right?)
Select each storyboard in the list of modified files, go down the XML diffs and discard any changes which move my images. They are fairly easy to spot.
Add a comment and finish the commit.
After the initial conversion, from 4.x -> 5, Xcode screwed with the location of my images. While it's an annoying process, it's a lot quicker than either re-creating the storyboard or manually trying to move items back to their original position.
Oh yeah... and please file Radars with Apple so they can solve the issue. :)
I encountered this issue as well for some storyboards when I switched between iOS 6 view and iOS 7 view. Only workaround that I have found was to recreate the storyboard from scratch (using XCode 5.)
I had the same problem, after loading an existing Storyboard into Xcode 5, it got automatically updated to the new format, and all the image views were missing.
Turns out the view hierarchies were intact, only the frames were messed up. I went through and fixed all the image view frames, and that fixed the project.
Well, I've found that swapping NSBoxes for NSView fix it and let its contents rest in peace, but...
I have a NSTableCellView with a NSTextField. I set the NSTextField position, clean and build and I do can see my NSTextField in its position. But, if instead of building while I have this NSWindow ON the screen, I build the project while displaying another NSWindow the position of the NSTextField is modified to strange values. Uffff, I don't know what to do next. Any hints?
Got it!!! With XCode 5, if you hide a NSTableColumn and try to modify de NSTableCellView's width, you'll find that x=-0 (?) and width=0. No matter how hard you try to change it. It won´t work. The only way to set the x position and width is to unhide the NSTableColumn, adjust de x and width and then hide it again. It took me a while to get across the solution. I hope that Apple makes something about it.

UITableview bottom is cut off on iphone5

Let me preface this by saying this works perfectly on the iphone 4 - retina and regular.
I have a grouped table that has 4 sections. to set it up i use the dispatch_async stuff in viewWillAppear to grab the information from a server - and then call reloadTable when the server returns.
after the table has been reloaded with the correct information, when i try and scroll down i see more cells but it gives resistance as if i had already reached the end of the table even though there are 3 or 4 more table cells to show and bounces back.
there is one cell that has an image and some text that i use cell.addsubview to add some subviews to it in the cellForRowAtIndexPath function.
but all the other cell heights are normal (44)
I am using IB to have the grouped table view and don't set the frame,bounds, or anything with it in my code - just set the various tablecell heights using the correct function.
does anyone know why it would work perfectly in the iphone 4 (i can scroll down to the bottom and see all the cells) and not in the iphone 5?
Thank you.
I had autolayout checked in the Xib files.
To fix the problem i set self.view.frame.size.height to 568 in the top view controller (i was using a navigation conroller that loaded table views). once i did that, all the child views worked correctly.
I have same problem to fix like below optimized way
if your using autoLayout don't be hardcode just use constraints
i don't know how to use XIB but i always use like this
tableview.frame = cgrectMake(0,320,self.view.frame.size.width,self.view.frame.size.height-64);
64= nabvar height(44)+ top bar (22);
hope this help :)

Can you set default nib size to 3.5" in xCode 4.5.1?

Ever since updating xCode to the latest version (v. 4.5.1) every time I create a new nib or storyboard it assumes a default view size of 4" (ie: to reflect the new iPhone 5). However, I'm working through many tutorials and text books as I'm learning Objective C and they all use 3.5" view sizes. I know how to go in and change view size back to 3.5 inch (as per my prior post/question here), but I'm wondering if there is a way in xCode to set 3.5 as the permanent default view size every time I create a new nib/storyboard. I looked around and there is no obvious method. I'm really getting tired of having to set nib/views to 3.5" over and over and over again.
if your interface is using Storyboard:
Open *.Storyboard with "Text Editor"
and go the end bottom & find
<simulatedScreenMetrics key="destination" type="retina4"/>
delete
type="retina4"
then it will be default size in 3.5"
if not Storyboard, it's using Xib
maybe you should edit each file.
How to make a uitableview in interface builder compatible with a 4 inch iPhone
In a xib, if you click the main view, you can choose the size there, in the simulated metrics. And in storyboard the same, you select a viewController and you can choose the size in simulated metrics

Resources