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
// | |
// UIBezierPath+Polygons.swift | |
// | |
// | |
// Created by Txai Wieser on 11/05/15. | |
// Copyright (c) 2015 TDW. All rights reserved. | |
// Based on: https://github.com/ZevEisenberg/ZEPolygon, thanks man! | |
import UIKit |
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
// | |
// Array+SafeSubscript.swift | |
// | |
// | |
// Created by Txai Wieser on 29/06/15. | |
// | |
// | |
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
// | |
// Delay.swift | |
// | |
// | |
// Created by Txai Wieser on 6/11/15. | |
// Copyright (c) 2015 TDW. All rights reserved. | |
// | |
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
// | |
// UIFitLabel.swift | |
// | |
// | |
// Created by Txai Wieser on 8/27/15. | |
// Copyright © 2015 Txai Wieser. All rights reserved. | |
// | |
import UIKit |
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
import UIKit | |
/// All ranges using NSString and NSRange | |
/// Is usually used together with NSAttributedString | |
extension NSString { | |
public func ranges(of searchString: String, options: CompareOptions = .literal, searchRange: NSRange? = nil) -> [NSRange] { | |
let searchRange = searchRange ?? NSRange(location: 0, length: self.length) | |
let subRange = range(of: searchString, options: options, range: searchRange) | |
if subRange.location != NSNotFound { |