Daniel Tovesson
Daniel Tovesson

Reputation: 2590

Navigation bar should stick to the top

When I add a Navigation bar with Interface Builder to a Table View Controller it moves when the user scrolls. Is it possible to make the Navigation bar static?

With static I means that it sticks to the top of the application and when the user scrolls the cells are the only thing moving. I've got this working by embedding the Table View Controller in a Navigation Controller but this is not the best solution for my application because it adds other errors.

Upvotes: 0

Views: 372

Answers (1)

rckoenes
rckoenes

Reputation: 69469

What you can do, create a plain UIViewController than in its view place the UINavigationBar. Under the UINavigationBar place a UITableView, now when you move the tableview the bar will stay in it's place.

Upvotes: 1

Related Questions