I want to add customized arrow buttons to UINavigation Bar which comes at the top.
what I want to do is create a custom image button and place it over the bar. When I tried adding to view like:
[self.view addSubview:leftArrowButton];//(Where leftArrowButton is a UIButton with an image of arrow)
This dont work, like it places the button but button gets hided under the bar and not overlap on it.
Any help is appreciated. Thanks.
Try doing the following:
You should consider using a
UIBarButtonItemrather thanUIButton.You can also customize the bar buttons as well with images (using the
initWithImage:style:target:action:):You can also use any view you like (with some consideration for the size) using the
initWithCustomView::