how to block user , if he/she not connected to internet connection when my app load
问题 I have one app, which is fully map view.What I need is I need to show some alert if user not connected to internet . I have done that. Here is the code : Reachability.swift. import Foundation import SystemConfiguration public class Reachability { class func isConnectedToNetwork() -> Bool { var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0, 0, 0, 0, 0, 0, 0)) zeroAddress.sin_len = UInt8(sizeofValue(zeroAddress)) zeroAddress.sin