ios-map-ui

Using Swift to create Maps while minimizing reliance on storyboards

Explore the project at github.com/roblabs/ios-map-ui

Mapbox Starter

A starter project for Mapbox maps in iOS

Features

How to Use

Screen Shots

Initial zoom and center

Storyboard


Empty Storyboard; all views added via code


Mapbox-UIBarButton

A Mapbox map with UIBarButtonItem added using Swift, with minimal use of the storyboard.

Features

Screen Shots

Initial zoom and center

Storyboard



Mapbox-Search

A Mapbox map with UISearchBar added using Swift, with minimal use of the storyboard.

Features

Screen Shots

Storyboard


MapKit Starter

To make a MapKit view without a storyboard

  1. In Info.plist, delete the key Main Storyboard file base name
  2. Be sure to add the Maps Capability in Project > Capabilities
  3. In your AppDelegate.swift, ``` func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

    window = UIWindow(frame: UIScreen.main.bounds)

    if let window = window { window.backgroundColor = UIColor.white window.rootViewController = ViewController() window.makeKeyAndVisible() }

    return true } ```