I need a function to run (a UIAlertView
) whenever there is a network connection error. I would like to do this as simply as possible. Thanks in advance!
Asked
Active
Viewed 52 times
-3

gm_
- 598
- 6
- 22
1 Answers
0
Take a look at this link Reachability from Apple developer website. Listen network changes and when it is notReachable show your alert view.

abdullahselek
- 7,893
- 3
- 50
- 40
-
Thanks for this. I am writing in Swift 3. Is there a documentation for Swift? Thanks! – gm_ Mar 13 '17 at 16:23
-
1You can also Objective-C in Swift but if you want to use Swift sources just try this [Reachability for Swift](https://github.com/ashleymills/Reachability.swift) – abdullahselek Mar 13 '17 at 16:26
-
Thanks for the help!!! – gm_ Mar 13 '17 at 16:32