Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tranvutuan

macrumors member
Original poster
Dec 19, 2011
74
0
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
 
Last edited:
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.