Skip to content

Instantly share code, notes, and snippets.

View bcye's full-sized avatar
🚢
Shipping

Bruce bcye

🚢
Shipping
View GitHub Profile
@bcye
bcye / main.swift
Created April 3, 2018 10:42
How to call a function of a vc inside another vc.
//Inside the main vc i put a function like this
//Function fetches data and calcs the total
func changeNavTitle() {
//[...]
// It does some stuff and then updates navigation label (you can change this to another label)
titleNav.title = "\(sum)\(currencySymbol)"
fetchedResultsController.changedContent = false
}
//Inside the other vc I call the function like this: