Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1928362
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:58:08+00:00 2026-05-17T06:58:08+00:00

I have this class loader.h #import <Foundation/Foundation.h> @class Reachability; @interface loader : NSObject {

  • 0

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 bellow the correct way to include the above 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 correct way? to use a class??

I want loader class to be in change and check for internet connectivity and I try to start from somewhere 🙂
thanks in advance 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T06:58:09+00:00Added an answer on May 17, 2026 at 6:58 am

    It is fine for you to do so, except some parts:

    • You are leaking the myLoader by not releasing or auto release it

    • You may need an init method so that you can populate some data (it is a convention for me not an error)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following class #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> @interface Bankdaten : NSManagedObject @property
I have this socket server script, import SocketServer import shelve import zlib class MyTCPHandler(SocketServer.BaseRequestHandler):
I have a method call in a base class that looks like this: #import
I have this class: Class B { private String D; private String E; }
I have this class file call SMSHelper.cs First I just wanted to know is
I have this class in which I run a for loop 10 times. This
I have this class which i would like to map: public class Contract {
I have this class: class OriginalClass { string FirstItem; List<string> ListOfSecondItems; } I want
i have this class public class Image { public string url { get; set;
i have this class called MemoryManager, it is supposed to implement a simple smart

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.