Created
October 18, 2021 14:08
-
-
Save xmhafiz/329a89ae76177e344780d37bc4ec506f to your computer and use it in GitHub Desktop.
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
class ProfileViewController: UIViewController { | |
//... | |
//... | |
func broadcastInfo() { | |
let image = UIImage() // some image | |
let data: [String: Any] = ["title": "...some text", "subtitle": "longer text", "image": image] | |
// post a notification | |
NotificationCenter.default.post(name: Notification.Name.profileUpdated, object: nil, userInfo: data) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment