How can I check whether the app is connected to the internet or not?
currently, I am using this code in my appdelegate.m file 
dispatch_queue_t connectivityThread = dispatch_queue_create("com.gm.kart.connectivity", NULL);
dispatch_async(connectivityThread, ^{
    while (true){
        if([GMMConnectivity hasConnectivity])
            NSLog(@"%@", @"connected");
        else
            NSLog(@"Not connected");
        usleep(10000000);
    }
});
and when I click my login button I want to do a  check whether the internet is connected or not using NSnotificationcenter?  
Please help me
 
     
     
     
    