אני מנסה לעבוד עם pull to refresh. אני צריך לבטל את האפשרות לשימוש בpull to refresh מתי שאין אינטרנט.
האם מישהו יודע כיצד לעשות את זה?
תודה לעוזרים.
- (BOOL) connectedToInternet{ NSString *URLString = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://www.google.com"]]; return ( URLString != NULL ) ? YES : NO;}
ואז תקרא לה, ותגיד If..
if (self.connectedToInternet==NO) {// Dont show\load pull to refresh}או שתעשה הפוך, ותגיד שאם יש אינטרנט אז תטען את ה pull to refresh
if (self.connectedToInternet==NO) {// Dont show\load pull to refresh}