This file contains hidden or 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
// | |
// UIImageView+Extensions.swift | |
// GT_PhotoAlbums | |
// | |
// Created by Leonid Nifantyev on 11/24/18. | |
// Copyright © 2018 Leonid Nifantyev. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or 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 | |
protocol StoryboardIdentifiable { | |
static var storyboardIdentifier: String { get } | |
} | |
extension StoryboardIdentifiable where Self: UIViewController { | |
static var storyboardIdentifier: String { | |
return String(describing: self) | |
} |
This file contains hidden or 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
// | |
// EventHandler.swift | |
// PriceBar | |
// | |
// Created by l.nifantyev on 9/24/18. | |
// Copyright © 2018 LionLife. All rights reserved. | |
// | |
typealias EventHandler<T> = (T) -> Void |
This file contains hidden or 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
// | |
// BasePresenter.swift | |
// GT_PhotoAlbums | |
// | |
// Created by Leonid Nifantyev on 11/23/18. | |
// Copyright © 2018 Leonid Nifantyev. All rights reserved. | |
// | |
import Foundation |
This file contains hidden or 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
// | |
// UIColorsExtensions.swift | |
// PriceBar | |
// | |
// Created by Leonid Nifantyev on 4/1/18. | |
// Copyright © 2018 LionLife. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains hidden or 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
// | |
// Extensions.swift | |
// PriceBar | |
// | |
// Created by Leonid Nifantyev on 1/4/18. | |
// Copyright © 2018 LionLife. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains hidden or 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 Foundation | |
import UIKit | |
let defaultFont = UIFont.systemFont(ofSize: 15) | |
extension NSMutableAttributedString { | |
@discardableResult func bold(_ text: String, font: UIFont = defaultFont) -> NSMutableAttributedString { | |
let attrs: [NSAttributedString.Key: Any] = [ | |
.font: font | |
] |
This file contains hidden or 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
// | |
// UILinkedLabel.swift | |
// Tele2 | |
// | |
// Created by l.nifantyev on 10/10/18. | |
// Copyright © 2018 Tele2. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains hidden or 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 UISearchBar { | |
var textField: UITextField { | |
guard let tf = (value(forKey: "searchField") as? UITextField) else { fatalError() } | |
return tf | |
} | |
func addToolBar() { | |
//Add done button to numeric pad keyboard | |
let toolbarDone = UIToolbar.init() | |
toolbarDone.sizeToFit() |
This file contains hidden or 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
func config(imgUrl: String, estimatedSize: CGSize?, description: NSAttributedString?) { | |
postImageView.estimatedSize = estimatedSize | |
postImageView.loadImg(fromUrl: imgUrl) | |
} |
OlderNewer