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
//MARK:- Draw Route Betweeen two points | |
/** | |
To draw a route between to cordinates. | |
- origin: Source marker cordinate | |
- destination: destination marker cordinate | |
- self.googleMapsKey: API Key | |
*/ | |
let origin = "-23.543293,-46.638592" |
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
// | |
// Webservice.swift | |
// | |
// Created by Mac on 29/07/17. | |
// Copyright © 2017 Leo Valentim. All rights reserved. | |
// | |
import SwiftyJSON | |
import Foundation |
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
// | |
// KeyboardProtocol.swift | |
// | |
// Created by Mac on 21/06/17. | |
// Copyright © 2017 Leo Valentim. All rights reserved. | |
// | |
import Foundation | |
import UIKit | |
@objc public protocol KeyboardProtocol : NSObjectProtocol { |
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
// | |
// DirectionAnimatedController.swift | |
// | |
// Created by Leo Valentim on 17/07/17. | |
// | |
import UIKit | |
enum DirectionAnimation { | |
case left, right, top, bottom |
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
#USAGE: sh clean_unused_images.sh | |
project_path='/Users/../../Projects/iOS/APP_IOS/' # Change to your project's path | |
assets_path=$project_path"Assets.xcassets" # asset's path | |
assets_name="${assets_path/$project_path/$(echo '')}" | |
printf "\e[92mGetting first images:\e[0m\n" | |
images="" | |
# Get Images from assets root directory |
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
extension Sequence { | |
/// Limits sequence indexes to a given maximum number | |
/// | |
/// - Parameter max: maximum number of indexes | |
/// - Returns: return limited sequence | |
public func limit(_ max: Int) -> [Element] { | |
return self.enumerated() | |
.filter { $0.offset < max } | |
.map { $0.element } | |
} |