#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    4
    Rep Power
    0

    Question Objects in Objective-C


    I do not have a quite clear understanding about objects in Objective-c, so please help me answer my questions.

    I know that you can create objects by just doing like the code below, but there is no allocated memory and it has not been initiated.
    Class * myObject;

    If I set it equal to this: [[Class alloc]init], what does it really mean? Why is the class's name used as the receiver of the alloc method?

    Lastly, are objects really class pointers
    If yes, how does this work?
    [myObject instanceMethod];

    I have been spending so much time thinking about this, and I hope you guys can help. :)
  2. #2
  3. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    6
    Rep Power
    0
    Hi..
    You can easily create an object in objective-c like
    programming object;
    object.input_value();
    object.output_value();

IMN logo majestic logo threadwatch logo seochat tools logo