I have two table views in a single controller.One is grouped whose frame is (0,0,320,70), other one is plain whose frame is (0,70,320,300).In the grouped tableView, I am adding the cells dynamically and want this plain tableView to shift down, so that the grouped tableView is completely visible. In a similar way,when I remove cells dynamically from grouped tableView, I want the plain tableView to shift Up and adjust according to the new height of grouped tableView.
Help me out with this. Is there any apple provided sample to do such a thing ?
Try in interface builder, in your size inspector for the table views, make sure both table views have flexible height set (i.e. the middle vertical up/down arrow in the little grid) and with luck it should just work.
If this doesn’t work you could also try in in addition, again in the size inspector in interface builder for each table, make the top table view fixed distance from the top of your containing view and the bottom table view fixed distance from the bottom of your containing view. (so solid top line, dotted bottom line for the top table view, and solid bottom line, dotted top line for the bottom table view). (still keeping the flexible vertical size setting as well on each – i.e. middle up/down arrow a solid red line).
Don’t forget to save you IB changes and rebuild your project before running to test.