6.7. Getting the expense back to ViewController
Update Expense data model:
//
// Expense.swift
// App6
//
// Created by Sakib Miazi on 5/18/23.
//
import Foundation
import UIKit
struct Expense{
var title: String?
var amount: Double?
var type: String?
var image: UIImage?
init(title: String, amount: Double, type: String, image: UIImage) {
self.title = title
self.amount = amount
self.type = type
self.image = image
}
}Update AddExpenseViewController's onAddButtonTapped() method:
Update the TableView to display the image in the cell

Last updated