I am developing one application for iphone and in that i have some issues regarding adding more then one UILabel
in navigation bar at a specific position.
What i want is in following images
in above image there is one backbar button and one imageview
as shown with arrow-mark. Other then that all white box is for difrent UILabels
to show in navigation bar.
There is only one UIImageView
in the navigation bar and one left bar button. Now problem is that i don't know how to add multiple UILabel
in navigation bar at a specific position.
Till now what i have worked is to add only button and UIImageView
with the right bar button array or left bar button array, but that only add items in sequnce.
So can anyone please guide me that how can anyone add UILabels or any other item at a specific position..
You can set an arbitrary view instead of a view controller's title:
Note that most likely the view's frame will be restricted to make room for
leftBarButtonItem
andrightBarButtonItem
.Try this code
Have a look at this piece of code. With some modifications it should solve your problem:
Just modify the values in the
CGRectMake()
to fit your needs.you can add Multiple UIlabel or Image as look like bellow image:-
this can do using bellow code you can change Label and imageView frame and put as your requirement
You can add subviews directly to the navigationBar -
yourLabel frame origin will be relative to the navigation bar