diff --git a/ProjectClock/AccountViewController.swift b/ProjectClock/AccountViewController.swift index 2a58b5b..fbcd201 100644 --- a/ProjectClock/AccountViewController.swift +++ b/ProjectClock/AccountViewController.swift @@ -260,6 +260,21 @@ class FamilyVC: UIViewController } } } + + /** + Called when the user clicks the leave family button + */ + @IBAction func btnLeave(_ sender: Any) + { + enterPin() + { + self.sendReq(APIs.familyChangePin, title: "Leaving...", params: ["pin": $0]) { it in + + localStorage.removeObject(forKey: "family") + self.msg("Leave Success!", "You left the family.") + } + } + } } /** diff --git a/ProjectClock/Base.lproj/Main.storyboard b/ProjectClock/Base.lproj/Main.storyboard index 1bd4319..ebd3215 100644 --- a/ProjectClock/Base.lproj/Main.storyboard +++ b/ProjectClock/Base.lproj/Main.storyboard @@ -1086,9 +1086,12 @@