I have this class
loader.h
#import <Foundation/Foundation.h>
@class Reachability;
@interface loader : NSObject {
}
- (void)startLoading;
@end
loader.m
#import "loader.h"
#import "Reachability.h"
@implementation loader
- (void)startLoading{
NSLog(@"Check network");
}
@end
Is the code below the correct way to include the specified class and use it
in my .h file I put
@class loader;
and in the .m file
#import "loader.h"
and i use this code
- (void)viewDidLoad {
loader *myLoader = [loader alloc];
[myLoader startLoading];
[super viewDidLoad];
}
Is this the right way? use class
I want the bootloader class to change and check the Internet connection, and I'm trying to start with something :) thanks in advance :)
source
share