Skip to content

Instantly share code, notes, and snippets.

View wbbernardes's full-sized avatar

Wesley Brito wbbernardes

  • Brasília - Brazil
View GitHub Profile
@wbbernardes
wbbernardes / Extensions.swift
Created June 27, 2020 23:11
Extension to article
extension UIViewController {
func startLoading() {
let storyboard = UIStoryboard(name: LoadingViewController.storyboard, bundle: nil)
if let loadingViewController = storyboard.instantiateViewController(withIdentifier: LoadingViewController.viewControllerId) as? LoadingViewController {
loadingViewController.modalPresentationStyle = .overCurrentContext
present(loadingViewController, animated: true, completion: nil)
}
}
}
import UIKit
import Lottie
class LoadingViewController: UIViewController {
// MARK: - Outlets
@IBOutlet weak var viewAnimation: UIView! {
didSet {
viewAnimation.layer.cornerRadius = 18.0
//
// HomePresenter.swift
// javapop
//
// Created by Wesley Brito on 28/03/20.
// Copyright © 2020 Wesley Brito. All rights reserved.
//
import Foundation
//
// HomeController.swift
// javapop
//
// Created by Wesley Brito on 22/03/20.
// Copyright © 2020 Wesley Brito. All rights reserved.
//
import Foundation
@wbbernardes
wbbernardes / HomeTableViewController.swift
Last active March 29, 2020 00:28
HomeTableViewController.swift
//
// HomeTableViewController.swift
// javapop
//
// Created by Wesley Brito on 21/03/20.
// Copyright © 2020 Wesley Brito. All rights reserved.
//
import UIKit
import Kingfisher
@wbbernardes
wbbernardes / tableviewWithHeader.swift
Last active January 13, 2020 14:24
tableview expandable header
var selectedIndx = -1
var newIndexSet = IndexSet()
var thereIsCellTapped = false
func numberOfSections(in tableView: UITableView) -> Int {
return 3
}
//
// Error+enum.swift
//
// Created by Wesley Brito on 12/07/19.
// Copyright © 2019 Wesley Brito. All rights reserved.
//
import Foundation
enum RequestErrors: String {
//
// Alert+ViewController.swift
//
// Created by Wesley Brito on 25/07/19.
// Copyright © 2019 Wesley Brito. All rights reserved.
//
import Foundation
extension UIViewController {
@wbbernardes
wbbernardes / Array+RemoveDuplicate.swift
Last active August 15, 2019 13:12
Remove duplicate elemente in array
//
// Array+RemoveDuplicate.swift
//
// Created by Wesley Brito on 12/08/19.
// Copyright © 2019 Wesley Brito. All rights reserved.
//
import Foundation
extension Array where Element: Hashable {
@wbbernardes
wbbernardes / cpfMask.swift
Last active December 17, 2018 21:24
Exemplo de máscara para CPF e CEP sem uso de dependência externa
//
// ViewController.swift
// ProjetoPodTest
//
// Created by Wesley Brito on 24/11/18.
// Copyright © 2018 Wesley Brito. All rights reserved.
//
import UIKit