views:

19

answers:

1

i have a table view in my root view of navigation controller.. if iam hiding my navigation bar my table view gets moving top but i want to fix that position to old posotion or it should be fixed from beging...

i have try with creating frame and moving but that does not solve my purpose...

A: 

Weird that you haven't succeeded with the frame...

Did you do it like this?

CGRect tableFrame = tableView.frame;
tableFrame.origin.y = 40;
tableView.frame = tableFrame;
Michael Kessler
is not works for me
lak in iphone
There are few possible "problems" that I have on mind: (1) `tableFrame.origin.y` is already 40 - try change it to 100; (2) `tableView` doesn't really point to your table - check your connections in Interface Builder and check if `tableView` is not nil; (3) the code above is executed before the view is rendered - try locating this code in `viewDidLoad`.
Michael Kessler