diff --git a/Exemple/OpenSourceControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate b/Exemple/OpenSourceControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate index 7d43009..da57818 100644 Binary files a/Exemple/OpenSourceControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate and b/Exemple/OpenSourceControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/OpenSourceController.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate b/OpenSourceController.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate index e5d5db0..8994fa4 100644 Binary files a/OpenSourceController.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate and b/OpenSourceController.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Sources/Controller/OpenSourceViewController.swift b/Sources/Controller/OpenSourceViewController.swift index 3e8c0c2..4cb9304 100644 --- a/Sources/Controller/OpenSourceViewController.swift +++ b/Sources/Controller/OpenSourceViewController.swift @@ -102,25 +102,34 @@ class OpenSourceViewController: UITableViewController { /// Prepare UIActivityIndicatorView and display it at the center of the view fileprivate func prepareActivityIndicator() { - self.indicator = UIActivityIndicatorView(frame:CGRect(x: 0, y: 0, width: 40, height: 40) ) + self.indicator = UIActivityIndicatorView(frame:CGRect(x: 0, + y: 0, + width: 40, + height: 40) ) self.indicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.gray self.indicator.center = self.view.center + self.indicator.hidesWhenStopped = true + self.indicator.backgroundColor = UIColor.clear + self.indicator.color = UIColor.black self.view.addSubview(indicator) } /// Start loading : start the loader animation fileprivate func startLoading() { self.indicator.startAnimating() - self.indicator.backgroundColor = UIColor.clear - self.indicator.color = UIColor.black self.indicator.isHidden = false + + // Disable scroll + self.tableView.isScrollEnabled = false } /// Stop loading : stop and hide the loader fileprivate func stopLoading() { - self.indicator.hidesWhenStopped = true self.indicator.stopAnimating() self.indicator.isHidden = true + + // Enable scroll + self.tableView.isScrollEnabled = true } // MARK: - Table View Data Source