Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // JuxNetworkActivityIndicator.swift
- // Bilal Arslan
- //
- // Created by BILAL ARSLAN on 14.12.2018.
- // Copyright © 2018 BILAL ARSLAN. All rights reserved.
- //
- import UIKit
- class JuxNetworkActivityIndicator {
- private static var loadingCount = 0
- class func add() {
- if loadingCount == 0 {
- UIApplication.shared.isNetworkActivityIndicatorVisible = true
- }
- loadingCount += 1
- }
- class func remove() {
- if loadingCount > 0 {
- loadingCount -= 1
- }
- if loadingCount == 0 {
- UIApplication.shared.isNetworkActivityIndicatorVisible = false
- }
- }
- }
Add Comment
Please, Sign In to add comment