I am using a MKUserTrackingBarButtonItem
to toggle my MKMapView's usertrackingMode.
Thanks for your help.
So it seems there is no way to directly add any kind of bar button item to a UIView
. We're going to have to subclass UIToolbar
to make a totally invisible toolbar. Override - (void)drawRect:(CGRect)rect
and put nothing, not even a [super drawRect]
. Then, in init, run the following code:
self = [super init];
self.backgroundColor = [UIColor clearColor];
self.opaque = NO;
self.translucent = YES;
return self;
For more details, visit this link: Couldn't UIToolBar be transparent?