UITableView Troubles - ios

I have created 3 tableview controllers from scratch on the main stroyboard in Xcode. I have desgined the rows etc.
Now when I create files, File-New to create the .h and .m files (Subclass UITableViewController), then I add the file as the Custom Class in the UITableView , the tableview does not show.
If I set the Custom Class as blank (default UITableViewController) it works fine.
Any ideas why it is blank and only the NAV bar is shown when I add the custom class to the table view controller.
thanks

Related

Swift : How do i make a master page structure in view controllers?

I am working in a project that it contains a header view. There is a UIImageView inside header view. I want to derive this header view and its appearance (constraints,bg color etc.) on all of my other view controllers. So is that possible to do it just using Xcode designer ?
I created a view controller in storyboard and BaseViewController class.
In second view controller, i created another class and derived it from BaseViewController. But this didn't work.
Create the view in xib the use that view in all viewControllers in all storyboards. For creating a custom view you can see this video:
https://www.youtube.com/watch?v=IrgH522lbfA

Adding Outlets to View Controller via Table View Controller

I'm attempting to create an application for iOS, using Xamarin and storyboards. Within this, there shall be a button located in a TableViewController which will navigate the user.
To do this, I've used a Container, embedded to a TableViewController. However, my concern is I wish to add an Outlet from the button within the TableViewController to the ViewController header class - Yet it only allows me to try and add one to the 'UITableViewController.h' file.
What is causing this and how am I able to add the Outlet to the 'ViewController.h' file? (Extremely sorry if this makes little sense)
You should not use both the UITableViewController and the UIViewController. UITableViewController is a subclass of UITableViewController so all you need the UITableViewController and you should drag the outlet to it.

View Container not showing table view control ios

I'm trying to embed a table view control inside a container here's my app:
when i set the table view control class to UITableViewController every thing works fine:
it shows the controller inside the container.
But now i want to put some code behind the table view controller so i add a class (h,m files)
and set the class of the UITableViewController to be TableController (thats my class name)
when i load the app now, it doesnt show the controller.
looking for some explanations or solutions to this problem.
thanks.
You can simply create a View controller class instead of creating a tableviewcontroller class . In its xib , add a tablview. Set table's delegates and data source , and start working on it .

How to add Both table view and View in a View

I am trying to create a Navigation based application where the rootviewcontroller has a uitableview in it. I would like to change this so its just a standard uiview however everything I have tried so far keeps giving me errors.
First of all you create navigation based application and then delete TableView from rootViewController.xib and take it view from library and connect it and more thing is that to insert uiviewcontroller instead of uitableview in rootviewcontoller.h file and build & run your project its work fine.
How can I add both table view and a uiview to that view?
Follow this steps:
1) Go to the .XIB and remove the UITableView from the root.
2) Add an UIView and put an UITableView inside of it.
3) Change the type of controller from UITableViewController to UIViewController ( you can change this on the 3rd tab):
4) Go to your class and change his parent from UITableViewController to UIViewController.
5) Add the UITableViewDataSource and the UITableViewDelegate protocols.
6) Connect your UITableView data source and delegate to your class from the .XIB

Xcode 4. Adding tableView to tab bar application

Ive created a new tab bar application in xcode 4 and it has generated a mainwindow.xib, firstView.xib, secondView.xib and viewController classes for each xib.
I would like to add a tableView to the firstView.xib, so i have added a UITableViewController class to the project and Xcode generated a new tableViewController.xib which displays a tableView.
How do i hook it up so the TableView is loaded into the firstView in xcode 4.
EDIT:
Ok, I've tried adding a tableViewController to the firstView.xib and setting its class name and nib properties to the name of my TableViewController class, but its not visible when the app runs.
Cheers
in firstView.h, add an IBOutlet which will represent the TableViewController
in firstView.xib, link the tableViewController to the corresponding File Owner IBOutlet
in firstView.m, in viewDidLoad method, initialize your tableViewController.
Here is a simple tutorial
http://www.techotopia.com/index.php/Creating_a_Simple_iOS_4_iPhone_Table_View_Application_(Xcode_4)

Resources