Skip to content

Instantly share code, notes, and snippets.

@TheNiks
Created February 3, 2023 04:50
Show Gist options
  • Save TheNiks/d43ba6bc7b2dec69cd34877c1d9a3253 to your computer and use it in GitHub Desktop.
Save TheNiks/d43ba6bc7b2dec69cd34877c1d9a3253 to your computer and use it in GitHub Desktop.
//
// ViewController.swift
// CompositeDesignPattern
//
// Created by Nikunj Modi on 08/11/22.
//
import UIKit
struct File {
var name: String
var data: Data
}
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
/// Problem On Day 1
func finishedCreateFileProcess(file: File) {
uploadToGoogleDrive(file: File(name: "test", data: Data()))
}
func uploadToGoogleDrive(file: File) {
// Code to upload to Google Drive.
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment