The iPhone Maps app has a toolbar below the map view (includes search / direction section controls and others). When moving on from a map view by clicking on a callout, the toolbar slides with the map view, leaving no toolbar except the next device (no table controller)
I have tried [ Self.navigationController setToolbarHidden: Yes Animated: Yes]
with another view controller, but it gives a funny toolbar that slides down the animation, while the map view is sliding to the left, while
Use of C [self.navigationController setToolbarHidden: Yes].
viewDidLoad
also causes bad effects (in the event of the toolbar disappearing the moment the animation starts, leaving the ugly white space).
I'm assuming the answer is to use a nib file, but I want to program this (if possible).
Can I get a new visual controller push when I see the map "stick" and slide the toolbar out with it? Thank you.
It turns out that the toolbar is to be created directly and it To see for yourself, it is in the code of UIViewController
for the UINavigationController
. . Frame coordinates can change according to what is on the screen
- Add a toolbar to (void) viewDidLoad {// Visual CGRect toolbarFrame = CGRectMake (0, 372, 320, 44) ; UIToolbar * myToolbar = [[Uitoolbar alloc] initWithFrame: ToolbarFrame]; UIBarButtonItem * compassButton = [[UIBarButtonItem alloc] initWithImage: [UIImage imageNamed: @ "compass.png"] Style: UIBarButtonItemStyleBordered Target: Self-action: @selector (zoomToCurrentLocation)]; CompassButton.width = 30.0f; // make the button a square shape [my talar set items: [object with the NSERRE array: compass buttons] Animated: no]; [Compassbutton release]; [Self.view addSubview: myToolbar]; [Super viewedload]; }
Comments
Post a Comment