Controlling the position of an image loaded in a UIImageView displayed in the navigation bar

I am displaying an image in the navigation bar (I am using UIImageView). Could you please let me know how I can place it at a specific x, y location in the nav bar?

Thanks.

0


a source to share


1 answer


Assuming you are adding a UIImageView as a subview of the UINavigationBar view, you can use the UIView method initWithFrame:

to select a specific CGRect

one to draw the view of the image inside. This method allows you to specify in terms of the supervisor coordinate system which rectangle your UIImageView should use.



See this Apple documentation page for more information (must be registered as iPhone developer).

+1


a source







All Articles