You need to create a UIViewController
instead of UITableViewController
. You can easily do in your current AFViewController
which actually a UITableViewController
, just follow these steps
- Open
AFViewController.h
changeUITableViewController
toUIViewController
. - Then open AFViewController.xib and add a
UIView
from controls. - Drag
UITableView
insideUIView
. - Right click
File Owner
connectview
to theUIView
and create IBOutlet for theUITableView
inside theUIView
.
Thats it you are ready to go.. And at last..
AFViewController *viewController = [[AFViewController alloc] initWithNibName:@"AFViewController" bundle:nil];