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 | |
| // A swift protocol can apply to a class, struct, or enum, | |
| // but only a reference type can be stored in a `weak` var, | |
| // so a weak var cannot be of a typical protocol type. | |
| protocol MyProcotol { | |
| } | 
        
  
    
      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 | |
| extension UIImage { | |
| subscript (x: Int, y: Int) -> UIColor? { | |
| guard x >= 0 && x < Int(size.width) && y >= 0 && y < Int(size.height), | |
| let cgImage = cgImage, | |
| let provider = cgImage.dataProvider, | |
| let providerData = provider.data, | |
| let data = CFDataGetBytePtr(providerData) else { | |
| return nil | 
  
    
      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
    
  
  
    
  | +(NSString *)returnURL: (requestMethodGET)methodGET line:(id)line{ | |
| NSString *SPTrans = @"http://api.olhovivo.sptrans.com.br/v0"; | |
| switch (methodGET) { | |
| case requestMethodGETLinhas: return [NSString stringWithFormat:@"%@/Linha/Buscar?termosBusca=%@", SPTrans, line]; break; | |
| case requestMethodGETDetalhes: return [NSString stringWithFormat:@"%@/Linha/CarregarDetalhes?codigoLinha=%@", SPTrans, line] ;break; | |
| case requestMethodGETParadas: return [NSString stringWithFormat:@"%@/Parada/Buscar?termosBusca=%@", SPTrans, line] ;break; | |
| case requestMethodGETParadasPorLinha: return [NSString stringWithFormat:@"%@/Parada/BuscarParadasPorLinha?codigoLinha=%@", SPTrans, line] ;break; | |
| case requestMethodGETParadasPorCorredor: return [NSString stringWithFormat:@"%@/Parada/BuscarParadasPorCorredor?codigoCorredor=%@", SPTrans, line] ;break; | |
| case requestMethodGETCorredores: return [NSString stringWithFormat:@"%@/Corred | 
  
    
      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
    
  
  
    
  | tableView | |
| .rx_modelSelected(PasteboardItem) | |
| .subscribeNext { [weak self] element in | |
| self?.pasteViewModel.addItemsToPasteboard(element) | |
| }.addDisposableTo(disposeBag) | 
  
    
      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
    
  
  
    
  | // Create a UIViewPropertyAnimator object. Here's a simple one with a UIKit animation curve: | |
| let colorChange = UIViewPropertyAnimator(duration: 0.3, curve: .easeIn, animations: { [weak self] in | |
| self?.view.backgroundColor = UIColor(red: 255.0/255.0, green: 80.0/255.0, blue: 43.0/255.0, alpha: 1.0) | |
| }) | |
| // There's also support for easy spring-based animations - all you need to set is a damping ratio (a value between 0 and 1). Alternatively, you can create your own curves by adopting the UITimingCurveProvider protocol. | |
| let alphaChange = UIViewPropertyAnimator(duration: 0.3, dampingRatio: 0.6, animations: { [weak self] in | |
| self?.circleView.alpha = 0.0 | |
| }) | 
  
    
      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
    
  
  
    
  | # The trick is to link the DeviceSupport folder from the beta to the stable version. | |
| # sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
| # Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
| sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
| # Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
| # (A similar approach works for older versions too, just change the version number after DeviceSupport) | 
  
    
      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 DismissalDelegate : class { | |
| func finishedShowing(viewController: UIViewController) | |
| } | |
| protocol Dismissible : class { | |
| weak var dismissalDelegate : DismissalDelegate? { get set } | |
| } | 
  
    
      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
    
  
  
    
  | // Create the Activity Indicator | |
| let activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .gray) | |
| // Add it to the view where you want it to appear | |
| view.addSubview(activityIndicator) | |
| // Set up its size (the super view bounds usually) | |
| activityIndicator.frame = view.bounds | |
| // Start the loading animation | |
| activityIndicator.startAnimating() | 
  
    
      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
    
  
  
    
  | A publicação de conteúdo em redes sociais não é uma construção de um CV público. | |
| Assim como a contribuição com projetos open source não se caracteriza, por si só, como um portfólio de venda. | |
| Não é porque postei receitas e fiz checkin em restaurantes que tenho pretensão em ser crítico da Michelin. | |
| Vocês indexam e expõe devs como se os mesmos estivessem aptos a serem bombardeados com spam de empresas e propostas de freelas ou projetos irrelevantes para o profissional. | |
| Inclusive, listando tecnologias que a pessoa não domina, gerando uma propaganda falsa. | |
| Foram além e infringiram regras do GitHub para coleção de dados: | |
| https://twitter.com/ezefranca/status/808344095919894529 |