3lvis / Networking

Swift HTTP Networking with stubbing and caching support
MIT License
1.36k stars 112 forks source link

Fixes #221 NetworkActivityIndicator not showing #222

Closed batjo closed 6 years ago

batjo commented 6 years ago

When I change

if UIApplication.responds(to: NSSelectorFromString("shared")) {
    (UIApplication.value(forKeyPath: "shared") as? UIApplication)?.isNetworkActivityIndicatorVisible = (self.activitiesCount > 0)
}

To

if UIApplication.responds(to: NSSelectorFromString("sharedApplication")) {
    (UIApplication.value(forKeyPath: "sharedApplication") as? UIApplication)?.isNetworkActivityIndicatorVisible = (self.activitiesCount > 0)
}

it works. Not sure why since it's UIApplication.shared and not UIApplication.sharedApplication

3lvis commented 6 years ago

Thanks @batjo!