From 5a821f7785533536c306e402af727be8236f9dd6 Mon Sep 17 00:00:00 2001 From: Jonathan Duarte <> Date: Fri, 29 Mar 2019 13:16:03 -0400 Subject: [PATCH] no message --- .../BalanceInterfaceController.swift | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/BalanceInterfaceController.swift diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/BalanceInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/BalanceInterfaceController.swift deleted file mode 100644 index 32773b4..0000000 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/BalanceInterfaceController.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// BalanceInterfaceController.swift -// SynchronyFinancial WatchKit Extension -// -// Created by Jonathan Duarte on 2/18/19. -// Copyright © 2019 Alan Maynard. All rights reserved. -// - -import WatchKit -import Foundation - - -class BalanceInterfaceController: WKInterfaceController { - var util: Int? - var didAnimate: Bool = false - - @IBOutlet weak var image2: WKInterfaceImage! - override func awake(withContext context: Any?) { - super.awake(withContext: context) - - // get plist data to generate balance metric - var plistValues = PlistUtil.readPlist(for: .balance) - let balance = plistValues[0][0] - let credit = plistValues[0][1] > 0 ? plistValues[0][1] : 1 - - util = Int(round((Double(balance)/Double(credit)) * 100)) - } - - override func didAppear() { - image2.setImageNamed("scores") - if !didAnimate { - image2.startAnimatingWithImages(in: NSRange(location: 0, length: util ?? 0), duration: 1.5, repeatCount: 1) - didAnimate = true - } - //image2.stopAnimating() - } - - override func willDisappear() { - } - - override func willActivate() { - // This method is called when watch view controller is about to be visible to user - super.willActivate() - } - - override func didDeactivate() { - // This method is called when watch view controller is no longer visible - super.didDeactivate() - } -}