1

Safari on iPad has this bar at the top (it isn't called "toolbar" on iOS, right?), with some icons and input are for searching.

How to put such buttons and input field into Navigation Bar? Is it even a Navigation Bar? From what I read a Navigation Bar has one button on the left, another one on the right and one Label in the middle. But how to create something like that "top" bar from Safari?

If I'm in XCode 4.0 and choose "View-based app", should I then set in the ViewController > Simulated Metrics > Top Bar > Navigation bar? And how to add buttons to it?

Edit

Sorry for the confusion - I don't know if the proper way is to add to a Navigation Bar. I'm just asking for a general overview how such "top "bar" is made. What kind of View do such items belong under?

Mikka Johnson
  • 81
  • 1
  • 7

3 Answers3

1

You probably don't want to use a navigation bar. They are very limited in what controls you can put in them. Try using a UIToolbar instead.

rekle
  • 2,375
  • 1
  • 18
  • 9
0

I think you may be looking for the UISearchBar

UISearchBar Sample Code

Community
  • 1
  • 1
Jason Cragun
  • 3,233
  • 1
  • 26
  • 27
0

In the interface builder you should be able to just drag and drop objects onto the navigation bar, as for the little icons, those are just buttons with no border and images. Those images are preloaded in the iOS SDK, so you won't have to make them, but if you want your own then you can make them yourself.

Jjack
  • 1,276
  • 4
  • 13
  • 20