Simple :
Try using the tag for the UIButton . By default assign tag as for standard mapView For Ex mapButton.tag = 100;
- (IBAction)mapSatelliteSegmentControlTapped:(UIButton *)sender
{
if(sender.tag == 100)
{
self.mapView.mapType = MKMapTypeStandard;
// Change the MapButton image as well as tag
self.mapButton.tag = 101; //
[self.mapButton setImage:[UIImage imageNamed:@"mapSateliite.png"] forState:UIControlStateNormal];
}
else
{
self.mapView.mapType = MKMapTypeSatellite;
// Change the MapButton image as well as tag
self.mapButton.tag = 100; //
[self.mapButton setImage:[UIImage imageNamed:@"mapStandard.png"]
}
}