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 StringProtocol { | |
var isValidCNPJ: Bool { | |
let numbers = compactMap(\.wholeNumberValue) | |
guard numbers.count == 14 && Set(numbers).count != 1 else { return false } | |
return numbers.prefix(12).digitoCNPJ == numbers[12] && | |
numbers.prefix(13).digitoCNPJ == numbers[13] | |
} | |
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
// | |
// UITextField.swift | |
// | |
// Created by Bruno Scheltzke on 07/06/20. | |
// Copyright © 2020 Bruno Scheltzke. All rights reserved. | |
// | |
import UIKit | |
extension UITextField { |
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
// | |
// UIScrollView.swift | |
// | |
// Created by Bruno Scheltzke on 07/06/20. | |
// Copyright © 2020 Bruno Scheltzke. All rights reserved. | |
// | |
import UIKit | |
extension UIScrollView { |
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
// | |
// String.swift | |
// | |
// Created by Bruno Scheltzke on 04/06/20. | |
// Copyright © 2020 Bruno Scheltzke All rights reserved. | |
// | |
import UIKit | |
extension String { |
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
// | |
// UIColor+Extension.swift | |
// | |
// Created by Bruno Scheltzke on 04/06/20. | |
// Copyright © 2020 Bruno Scheltzke All rights reserved. | |
// | |
import UIKit | |
extension UIColor { |
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
// | |
// UIView+Extension.swift | |
// | |
// Created by Bruno Scheltzke on 04/06/20. | |
// Copyright © 2020 Bruno Scheltzke All rights reserved. | |
// | |
import UIKit | |
/// Tag used to remove lock view when requested |
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
// | |
// UIViewController.swift | |
// | |
// Created by Bruno Scheltzke on 04/06/20. | |
// Copyright © 2020 Bruno Scheltzke All rights reserved. | |
// | |
import UIKit | |
extension UIViewController { |
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
// | |
// GradientView.swift | |
// | |
// Created by Bruno Scheltzke on 19/06/20. | |
// Copyright © 2020 Bruno Scheltzke All rights reserved. | |
// | |
import UIKit | |
@IBDesignable |
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
// | |
// ShadowView.swift | |
// | |
// Created by Bruno Scheltzke on 14/06/20. | |
// Copyright © Bruno Scheltzke. All rights reserved. | |
// | |
import UIKit | |
@IBDesignable | |
class ShadowView: UIView { |
NewerOlder