-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed files to more accurately represent them. Changed wellness rad…
…ial indicator to match the others. Added metric for late payments and number of accounts.
- Loading branch information
Jonathan Duarte
committed
Mar 29, 2019
1 parent
83e5766
commit 3be3eef
Showing
6 changed files
with
103 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
57 changes: 57 additions & 0 deletions
57
SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountNumInterfaceController.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// 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 AccountNumInterfaceController: WKInterfaceController { | ||
var accNum: Int = 3 | ||
var didAnimate: Bool = false | ||
var score: Int? | ||
|
||
|
||
@IBOutlet weak var image2: WKInterfaceImage! | ||
override func awake(withContext context: Any?) { | ||
super.awake(withContext: context) | ||
|
||
//Assigns score based on # of accounts | ||
switch accNum { | ||
case 2...3: | ||
score = 50 | ||
case 3...4: | ||
score = 75 | ||
case 5...10: | ||
score = 100 | ||
default: | ||
score = 25 | ||
} | ||
} | ||
|
||
override func didAppear() { | ||
if !didAnimate { | ||
image2.setImageNamed("scores") | ||
image2.startAnimatingWithImages(in: NSRange(location: 1, length: score ?? 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() | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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