Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-28-2009, 09:38 PM   #1 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 23
Question Adding UITableView with TableViewController to a UIViewController

Hey how's it going,

Trying to get these two things to play nice together. I have a UIViewController associated with a tab Bar View. BTW I am using Interface Builder!

I also have a UITableViewController and class inside a separate nib. If I make this tab on the tab Bar use a TableViewController instead of the ViewController, the TableView loads fine and parses the XML like it should. Only I want to have a static image header, and if I have it as part of the TableViewController, it scrolls with the table.

I would like to put a UITableView inside the UIViewController and have it function the same. I created a subclass of UITableViewController and added an instance inside the library of this MainWindow nib (where the tab bar and all the other views are). Associated the right class with it and also associated the ViewController class with the tab bar view.

In Interface Builder I connected the UITableView inside the view of the ViewController to the UITableViewController and also connected the delegate and dataSource to the UITableViewController as well. It compiles fine and everything but the UITableView is blank, and it doesn't even go through my code inside the TableViewController class.

Do I need to do something inside the UIViewController class that the TableView is inside of to tell it to go through the TableViewController class and populate the TableView?
MattTrout is offline   Reply With Quote
Old 10-28-2009, 09:52 PM   #2 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 23
Default

Nevermind! I got it to work...I had a dumbass moment, I never added the .delegate = self and .dataSource = self in the ViewDidLoad method.
MattTrout is offline   Reply With Quote
Old 11-05-2009, 01:50 AM   #3 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Atlanta
Posts: 411
Red face

Can you post the code that works? I'm having the same problem. Thanks.
funkytaco is offline   Reply With Quote
Reply

Bookmarks

Tags
uitableview, uitableviewcontroller, uiviewcontroller, xml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 269
18 members and 251 guests
14DEV, ADY, ArtieFufkin10, Dani77, HemiMG, IphoneSdk, jakerocheleau, JasonR, jimbo, MACralik, NSeven, prchn4christ, Rudy, silverwiz, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:56 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0