I want to Show a banner in iOS app when network not reachable and disable apps functionality until it is reachable again . Is it possible? -
i had created ios app crashes when network not reachable since data received nil. since don't want update parts of code accessing network , want show banner when internet not reachable , temporarily disable parts of app docent crashes . saw feature in uber app , curious . can me in matter ? thank
yes, of third party library outside used networking use apple class called reachability
. reachability helps check if there internet connection before calling web service or network functionality in general. can use in 2 ways:
- test if connectivity available before doing network operation
- register observer connectivity status changes
to want achieve register interesting classes observers , once notification check if internet connection available or not, doing operation want: alert user, put overlay on interface block user operation until connection available again.
Comments
Post a Comment