views:

487

answers:

0

I have a ViewController consists of a ImageView on top at (0, 0, 320, 100). I need to have a tableViewController below it, say from (0, 100, 320, 380). This is how to do it. It works but the problem is when i click a row on the table, I need to push anotherViewController. But there is no way to get back to the "parent" controller (there is no parent-child connection) since I use [self.view addSubview:slcon.view]

    #define tableHeight 150
    UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, tableHeight)];
[imgView setImage:[UIImage imageNamed:@"movies.png"]];
[self.view addSubview:imgView];


ListController *slcon = [[ListController alloc] initWithStyle: UITableViewStylePlain];
[slcon.view setFrame:CGRectMake(0, tableHeight, 320, 480 - tableHeight)];
[self.view addSubview:slcon.view];

How do I reposition my tableController at (0, 100, 320, 380)? Or how do I get access to the "parent" controller?