A Guide To getting Started With MapKit On iOS Using Swift

Maps are an essential feature for many apps and Pranjil Satija has written a nice up-to-date guide using Swift showing how to get started with using the iOS framework’s MapKit

  • Setting up your project to use MapKit
  • Laying out your map in interface builder
  • Gathering the user’s location
  • Creating custom annotations and shapes
  • Displaying custom annotations and shapes in the proper location on the map

You can find the tutorial over on the Appcoda Blog.

A nice guide to getting started with MapKit.

Original article: A Guide To getting Started With MapKit On iOS Using Swift

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Vulcan – Easy Swift Image Downloading With Built In Caching, Multi-Download Support, And More

Vulcan is an open source Swift library from Jin Sasaki that simplifies image downloading with built-in support for multi-image downloading, image caching.

In addition to multiple downloads and caching Vulcan also adds support for the WebP image format for extremely small image file sizes.

This snippet from the readme shows how to perform image downloading:

import Vulcan

// Single downloading
imageView.vl_setImage(url: URL(string: "/path/to/image")!)

// Multi downloading
// This image will be overridden by the image of higher priority URL.
imageView.vl_setImage(urls: [
    .url(URL(string: "/path/to/image")!, priority: 100),
    .url(URL(string: "/path/to/image")!, priority: 1000)
    ])

You can find Vulcan on Github here.

A nice pure Swift library for image downloading.

Original article: Vulcan – Easy Swift Image Downloading With Built In Caching, Multi-Download Support, And More

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Timepiece – Swift Library That Dramatically Simplifies Working With Dates

Timepiece is an open source Swift library from Naoto Kaneko for working with dates with clean and intuitive syntax that works with iOS, macOS, tvOS and watchOS.

In addition to simple date creation Timepiece supports date calculations, formatting, and parsing of dates.

These code snippets from the readme show the syntax of using Timepiece:

Date(era: 235, year: 26, month: 8, day: 14, hour: 20, minute: 25, second: 43, nanosecond: 0, on: Calendar(identifier: .japanese))
Date(year: 2014, month: 8, day: 14, hour: 20, minute: 25, second: 43, nanosecond: 0)
Date(year: 2014, month: 8, day: 14, hour: 20, minute: 25, second: 43)
Date(year: 2014, month: 8, day: 14)

Date.today()
Date.yesterday()
Date.tomorrow()

now + 1.year
now – 2.months
now + (3.weeks – 4.days + 5.hours)

1.year.later
1.year.ago

now.string(inDateStyle: .long, andTimeStyle: .medium)
now.dateString(in: .medium)
now.timeString(in: .short)

3.days.string(in: .full)

"2014/8/14".date(inFormat: "yyyy/MM/dd")
"2014-08-14T20:25:43+0900".dateInISO8601Format()

You can find Timepiece on Github here.

A nice Swift library for working with dates.

Original article: Timepiece – Swift Library That Dramatically Simplifies Working With Dates

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.