stupid question but must to clarify

Discussion in 'iOS Programming' started by tranvutuan, Dec 31, 2011.

  1. tranvutuan, Dec 31, 2011
    Last edited: Dec 31, 2011

    tranvutuan macrumors member

    Joined:
    Dec 19, 2011
    #1
    Code:
    myClass.m
    @interface myClass {
       NSMutableArray   *myArray;
    
    }
    @end
    @implement
    .....
    .....
    What is the purpose when you are trying declare a variable like above. How it looks differently when you declare like beloew

    Code:
    myClass.h
    @import "UIKit/UIKit.h"
    
    @interface myClass () <TableViewDataSource>
    NSMutableArray *myArray
    
    @end
    Please advice me about this. thanks
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    There are several mistakes here, but are you trying to say, what are private interfaces?
    In the first block, you are defining a private interface upon that class ,that can be used only in the implementation file.
    If you do it by the last way, every class that imports your myClass can call this method, and with PRIVATE interfaces, they can't, don't know if this sounds logic, but that's kinda it :p
     

Share This Page