Custom views in navigationbar (iOS 3.2)
Custom views in navigationbar (iOS 3.2)
- Subject: Custom views in navigationbar (iOS 3.2)
- From: Christian Ziegler <email@hidden>
- Date: Wed, 23 Jun 2010 12:51:39 +0200
Hi guys,
I'm having a hard time with the navigation bar. What I'm trying to do is adding a custom breadcrumbs navigation to the bar. I coded two classes, a subclass of UIButton for the breadcrumbs segments and a sublcass of UIView for the whole bar. The bar has a home segment which represents the rootViewController of the navigationController and you can add additional segments when you push new viewControllers on to the navigationController's stack.
When I put the bar in the leftBarButtonItem it displays the home segment and it also adds segments when I push new view controllers. So far so good, but if I click on on of the segments to pop to the respective view controller the action method does not get called unless its the home segment (which is the first button in the custom view). The home segment works fine but all other segments are being ignored.
As a workaround I tried putting the bar in the titleView. Another problem occured. On the rootViewController it correctly displays the home segment, but when I push a new viewController the updated (with an additional segment) bar fades in and then it disappears leaving me with an empty navigationbar. Same thing happens when I push another viewController. Funnily enough, if I do not set the titleview of the second viewcontroller's navigationItem but I still set it on the third, the titleview does not disappear on the third viewController, although I'm doing exactly the same.
Anyone got an idea?
One more question on the side: Are the width of the left/rightBarButtonItem and titleView limited?
Cheers,
Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden