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+Utils.swift | |
// Swift Utils | |
// | |
import Foundation | |
extension Array where Element: Hashable { | |
mutating func filterAppend(newElement: Element) { |
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
// | |
// UIApplication+Utils.swift | |
// Swift Utils | |
// | |
import Foundation | |
extension UIApplication { | |
class func topViewController(base: UIViewController? = (UIApplication.sharedApplication().delegate as! AppDelegate).window?.rootViewController) -> UIViewController? { |
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
// | |
// UIViewController+StatusBar.swift | |
// Swift Extensions | |
// | |
import Foundation | |
import UIKit | |
/// Custom status bar background color on UIViewController | |
extension UIViewController { |
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
// | |
// NSDate+Utils.swift | |
// Swift Extensions | |
// | |
import Foundation | |
import UIKit | |
extension NSDate { | |
class func dateByAddingDays(days: Int) -> NSDate { |
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
// | |
// String+Localizable.swift | |
// Swift extensions | |
// | |
import Foundation | |
import UIKit | |
// MARK: Localized |
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
// | |
// UIColor+Hex.swift | |
// Swift extensions | |
// | |
import Foundation | |
import UIKit | |
enum ColorComponentError: ErrorType { | |
case InvalidRedComponent |
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
// | |
// NSThread+blocks.swift | |
// Swift extensions | |
// | |
import Foundation | |
public typealias Block = @convention(block) () -> Void | |
extension NSThread { |