tags:

views:

43

answers:

1

I'm writing my first iphone app and through several examples I've got a UITableView which is displaying some records from an sqlite db. I placed the element through IB and then had to set it's height inside of my view controller, in the viewDidLoad method:

self.tableView.frame = CGRectMake(0,150,320,300);

While the positioning appears to be working properly, a text field, button and label I originally had on the page are now being covered by a white area. Am I not positioning this table properly?

They're all within the same view - do I need to use multiple views?

Here is what the running app looks like: http://tinypic.com/r/2n7qj35/5

Here is what the IB view looks like: (before the table was ever added, the text/button stuff showed up just fine): http://tinypic.com/r/1491kw4/5

A: 

You'll need to resize the tableView or move the other objects ( a text field, button and label ) around to accommodate the tableView.

Jordan
I've added the images. As far as I know, they should not be covering each other up, but something isn't working.
BotskoNet
Looks like frame on tableView not set properly, or you've also added another UIView. Can you post your code?
Jordan
Latest code can be found here: http://github.com/botskonet/inmyspot
BotskoNet
Do you see anything? I can't seem to find any helpful info on the web so I'm not sure what else to try.
BotskoNet
Ok, so my "solution" is possibly how I should have built this originally, was to move the text field, button, and label to another view, and add that new view first, and then load the table view. So far everything seems to be looking right and working right in the simulator.
BotskoNet