Can't display empty Table View Controller - ios

I'm following the Apple tutorial on how to develop iOS apps.
At some point tutorial tells me to add a table view controller to my story board and change the arrow of the story board entry point to point to that one.
I do it save and run. A blank screen shows up. In the tutorial they say it should show an empty table with emtpy rows.
Simulator on iPhone 6. (iPhone 6S and above seems to work)
Any idea what I'm missing?

Without seeing your project now sure what is wrong. I just created a new project and added a Table View Controller and set it as the InitialViewController and it works. Make sure in the attributes inspector ( on the right hand side of Xcode that the box is checked that says " is initial View Controller" and you should get an empty table view with empty rows when you run it in the simulator

Set the tableViews constraints to the top, bottom, and both sides of its containing view. Then right click the tableView and drag onto the yellow button on the top left of the viewController. Hit delegate, then do it again and hit datasource. Then try to run the project.

Related

Need to change which view gets displayed on start up

I created a Xcode project using the tabbed application template. Currently, when the app is started, it immediately switches to the First View Controller. I would like to change it to go to the Second View Controller instead. I've looked at the Tab Bar Controller for attributes. The only thing I see is under the Connections inspector/Trigger Segues/view controllers shows a list of View Controllers (First, Second, Third). Does anyone know how to change the automatic switch? iOS 8/Xcode 6.1
There are two ways to do this.
Firstly, there's an arrow at the left of the Initial View Controller. You can drag this arrow to any other view controller and that will become the initial controller.
Secondly, you can click on the view controller, go to the Metrics tab in the inspector (the one with the downward pointing thing) and then check the option that says "Is Initial View Controller".
The answer to this question is: Delete the First connection listed under the identity inspector and then re-add it. This bumps the second one up to the first place and positions it where I want it.

Display the slope view controller in XCode 5

An issue I have in XCode 5 seems to be resolved by the first answer to this question. However, that question has you take certain actions in a window entitled "Slope View Controller". Can anyone point me to the place in XCode 5's UI where I can access this window? I suspect that screen shot might be an older version and I need to be looking at something else, but I have no idea what.
SlopeViewController is nothing just name of viewController. You can acess that window by right clicking on view controller(Yellow square on left side of image) in storyboard
As you see in my picture it is showing Master View Controller by right clicking on yellow Master View Controller

How to get the scene dock in xcode 4.6 to display the view controller name?

I am just getting started with xcode 4.6 and iOS dev in general.
I created a single view iOS app and I can see the scene dock,but am not able to see view controller name on the scene dock while viewing the mainstoryboard in xcode. Instead I see the view controller, first responder and responder icons on it. How do I get the view controller name to appear.
You can see the screenshot at http://i49.tinypic.com/15n64vt.png
Apparently the name is displayed when you select a different view controller in Interface Builder, but in your case you cannot do it since you are working with a single view controller.
Therefore I suggest you to use the document outline to show the name of your view controller. You can open it by clicking the rounded icon on the bottom left.

How to re-order segues in initial view's tabbar controller in xcode 4.5?

How do I reorder the initial view's tabbar controller elements without having to delete all the segues and re connect them manually in the desired order? Is there a way to change the order of these after they have been hooked up?
I was able to do this by just dragging them around in xcode 4.4 but that option seems to be non available in xcode 4.5.
Hopefully, this is possible from within the storyboard mode. But if it's only possible programmatically, that's ok too, just looking for any proper way to accomplish this without having to delete them all and re hook them up.
For example, how would I move the 'Home' item to first position?
The positions in each view are associated with the positions on the bottom bar of the Tab Bar Controller. If you reorder that bar you will reorder your views. You can reorder them by drag and drop on your interface builder.
In your example just select Home in your Tab Bar Controller and drag it to the first position.
If you have problems dragging and dropping try to select first your Tab View Controller or exit your XCode and open it again (like #thepumpkin1979 and #Rick pointed out).
Just edit the xml file and it will work.
Click on your "storyboard" and click the most right of the 3 buttons in "Editor".
This will show up an xml file on the left which u can edit anyway you wish.
Inside that file you should see xml tag "tabBar", inside it is "items", inside this is "tabBarItem".
All your tabBar items will be listed. You may cut and paste them in the order you wish.
I just did it now in Xcode 4.5.2.
Hope it also works for you too.
Ps. I am new to iOS so I can't use all the right Xcode names.
I think you can control+drag the tab item to reorder.
Drag and drop should work
You can drag the bar Item to the left to rearrange its position from the Storyboard.

How can I make my UIView visible in Xcode's Storyboard editor?

Please have a look at the screenshot that shows a part of a storyboard in Xcode. It is one controller. On the same level as the controller there are two UIViews "Date Picker View" and "Input Accessory View".
In the controller itself, they are shown in the bottom toolbar (see 2nd screenshot - the two icons to the right are tiny previews of the the views).
But how can I edit them? I cannot get them on the screen! I know they are there but I'd like to edit them (used to work before I made them parallel elements of the controller)! I tried right clicking, long clicking, zooming, panning, double clicking - nothing. If I drag one of the views into the controller's view, I can see them.
There are also outlets in the controller, referencing the views and the view can be used from code just fine. But editing them seems to have become impossible.
You can select them and edit their properties in the inspector, but there is no way to visually edit them short of physically moving them into one the scenes, editing them, and moving them back.

Resources