I want to block my app's ui when there is no network connectivity.
I saw this post about checking network connectivity.
Is there a way to register for a listener with callback
You can use Reachability class to get notification when network status has changed. Refer https://developer.apple.com/library/ios/samplecode/Reachability/Introduction/Intro.html for documentation as well as sample code on integrating Reachability. It gives you
kReachabilityChangedNotification notification which is broadcasted when network status has changed. Once you get the notification you can check whether network is available or not.
You can also refer this How to use reachability class to detect valid internet connection?