I just got a little problem. I found this code:
MKUserTrackingBarButtonItem *trackingButton = [[MKUserTrackingBarButtonItem alloc]initWithMapView:self.mapView];
[self.mapToolbar setItems: [NSArray arrayWithObject:trackingButton] animated:YES];
and I want to add an additional button on the right side (at left is the tracking button).
NOTE
its is a UIToolbar not a navigationbar
so i just tried this:
MKUserTrackingBarButtonItem *trackingButton = [[MKUserTrackingBarButtonItem alloc]initWithMapView:self.mapView];
UIBarButtonItem* rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Pins" style:UIBarButtonItemStyleBordered target:self action:@selector(rightButton:)];
[self.mapToolbar setItems: [NSArray arrayWithObjects:trackingButton, rightButton, nil] animated:YES];
but it isn't working any ideas?
EDIT
I updated the code: added button to NSArray