Tutorial details

Creating A Map View | App Code for Sale | Preview

Creating A Map View | iOS Tutorial

How to create a map view

Overview PAGE TOP

Reference: http://www.geekylemon.com/WEBPROTECT-xcodemapview.htm

In this tutorial i will be showing you how to create a map view


  • UIMapView
  • TabBar
  • Segment control

Everyone is aware of a map view my famously used to google maps and in the tutorial i will be showing you how to locate you current location and switch between map, satellite and hybrid views

ViewController.h PAGE TOP

#import <MapKit/MapKit.h>
@interface ViewController :UIViewController {
MKMapView *mapview;
@property (nonatomic, retain) IBOutletMKMapView *mapview;


ViewController.m PAGE TOP

@implementation ViewController
@synthesize mapview;
-(IBAction)getlocation {
mapview.showsUserLocation = YES;
-(IBAction)setMap:(id)sender {
switch (((UISegmentedControl *) sender).selectedSegmentIndex) {
case 0:
mapview.mapType = MKMapTypeStandard;
case 1:
mapview.mapType = MKMapTypeSatellite;
case 2:
mapview.mapType = MKMapTypeHybrid;

Reference PAGE TOP


0 Comments Leave a comment

Please login in order to leave a comment.

Newest first

to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.