ios - NSNotificationCenter 'selector' working more than once is single Network status change -
in app want detect network status changes operations @ time. have added following code in app-delegate. when turn on net connection "networkstatuschanged:
" method called once correct. , when turn off net-connection calls twice. can me find out problem please......
[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(networkstatuschanged:) name:kreachabilitychangednotification object:nil]; reachability = [[reachability reachabilityforinternetconnection] retain]; [reachability startnotifier];
it doing once lost wifi connection , second time lost cell data connection.
Comments
Post a Comment