This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// GifBuilder.swift | |
// Landscape | |
// | |
// Created by Cameron Deardorff on 6/10/20. | |
// Copyright © 2020 Cameron Deardorff. All rights reserved. | |
// | |
import UIKit | |
import ImageIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIImagable.swift | |
// Landscape | |
// | |
// Created by Cameron Deardorff on 1/31/20. | |
// Copyright © 2020 Cameron Deardorff. All rights reserved. | |
// | |
import UIKit | |
import Photos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to solve the invalid region <center:##.###, ##.### span:##.###, ##.###> issue | |
extension MKMapView { | |
// determines if the region provided is in fact a valid region that can be shown on the map | |
// notes: latitude -> [-90, 90], !nan, !inf | |
// longitude -> [-180, 180], !nan, !inf | |
// latitudeDelta -> [0, 180], !nan, !inf | |
// longitudeDelta -> [0, 360], !nan, !inf | |
func canShow(region: MKCoordinateRegion) -> Bool { | |
//.....center latitude | |
return region.center.latitude != Double.infinity && region.center.latitude != Double.nan |