Skip to content
Permalink
ffd4f19259
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
29 lines (25 sloc) 773 Bytes
//
// WKInterfaceImage+Extensions.swift
// SynchronyFinancial WatchKit Extension
//
// Created by Alan Maynard on 3/28/19.
// Copyright © 2019 Alan Maynard. All rights reserved.
//
import Foundation
import WatchKit
extension WKInterfaceImage {
public func configureForActivityIndicator() {
self.setHidden(false)
self.setImageNamed("cc_activity_")
self.setHorizontalAlignment(.center)
self.setVerticalAlignment(.center)
startAnimatingAsIndicator()
}
public func startAnimatingAsIndicator() {
self.startAnimatingWithImages(in: .init(location: 0, length: 6), duration: 0.5, repeatCount: 0)
}
public func stopAnimatingAsIndicator() {
self.setHidden(true)
self.stopAnimating()
}
}