Fresh Beginning
  • Home
  • Portfolio
  • My Clothing Shop
  • Etsy Clothing Store
  • Buy Me A Coffee
  • Patreon
  • Speaking
  • Reading
  • About Me
  • Contact Me
Subscribe

Protocols

A collection of 2 posts
Swift 3.0

Swift 3.0 - What is as, as? and as! operators?

We all have been there where language offers plethora of options. However, I have quite experienced that bunch of features sometimes cause confusion even though individual feature is easier to understand. When all the features come at once, it gets quite scary to remember what goes where. In this post
May 18, 2017 4 min read
Swift

Swift testing with protocols

In this post, we shall see how protocols work with unit testing. Say, you have a downloader class DownloadFileClass for fetching network data. It follows the protocol DownloadFileProtocol. The whole class and protocol looks like this. protocol DownloadFileProtocol { func downloadFile(with name: String, completion: (String) -> ()) } class DownloadFileClass { var downloadedFile:
Nov 25, 2016 1 min read
Fresh Beginning © 2025
Powered by Ghost