问题描述:

I want to have a page like this:

It is the map page of the iPad map. As you can see it has a location search bar on the top.

Is it possible to have a search bar like this image on the top when the screen have navigation bar on his top?

EDIT:

More than implementing this, it is important that using a search bar on a navigation bar was not wrong with apples guide line. please help also about this.

Thanks

网友答案:

It is not agains iphone quide line. my application with this search bar approved.

The below code will add uisearch bar to your navigation bar:

LocationSearchBar = new UISearchBar (new RectangleF (0,0,250,44));
            UIBarButtonItem searchButtonItem = new UIBarButtonItem (LocationSearchBar );
this .NavigationItem .RightBarButtonItem =searchButtonItem;
相关阅读:
Top