0

I am using MKMapView in my application. i need to show current location on Map. When i am showing it on iOS 6.0 or 6.1, it is working fine.
On iOS 7.0, Map is not appearing properly.

have a look of map in iOS 7.0 -

enter image description here


Can anyone suggest why map's background is not appearing here, is there any extra approach form iOS 6.0, we will have to perform to show map in simulator in iOS-7.0 ?

Nico
  • 1,788
  • 2
  • 23
  • 41
  • Can you share some code? – iSmita Nov 21 '13 at 10:24
  • well, i have done whole process for it 1) Add MAPKIT framework. 2) imported the #import . 3)Make Property of MKMapView. 4) //mapType mapViewUSafe.mapType=MKMapTypeStandard; //will show the current location mapViewUSafe.showsUserLocation = YES; 5) Clean>Build>Run the Project. – Nico Nov 21 '13 at 10:30
  • 1
    Try this - MKMapView *dashboardMapView = [[MKMapView alloc] initWithFrame:CGRectMake(5, 50, 310, 140)]; dashboardMapView.delegate = self; dashboardMapView.backgroundColor = [UIColor clearColor]; dashboardMapView.showsUserLocation = YES; dashboardMapView.zoomEnabled = YES; [dashboardMapView.userLocation addObserver:self forKeyPath:@"location" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:NULL]; [self.view addSubview:dashboardMapView]; – iSmita Nov 21 '13 at 10:34
  • Thanks smita but it didn't enough for it. – Nico Nov 21 '13 at 10:47
  • Is it working or not?because it works for me for both iOS6 as well as iOS7.:) – iSmita Nov 21 '13 at 10:49
  • i am using x-code 5 and tried to run it on iOS 7 but not get what i need, on iOS 6 my previous code is working. thanks smita – Nico Nov 21 '13 at 10:56
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/41620/discussion-between-nico-and-smita) – Nico Nov 21 '13 at 11:02

1 Answers1

6

Simulator will not show user current location no matter whether it is iOS 6, 6.1 or iOS 7. To simulate location you can see here. If you want to show user current location then run your app in device

Community
  • 1
  • 1
Bhumeshwer katre
  • 4,671
  • 2
  • 19
  • 29
  • it seems useful... upvote you my friend. On iOS 6.0 when map gets appear then why it is not appearing in iOS 7.0 – Nico Nov 21 '13 at 10:52