Hello guys,
I need to create new data type with a NSDictionary and then when i declare the object be able to work with that with its functions ,look at this code
this code is doing what i want
.h file
Complete code
.m file
Complete Code
and for using it's like this:
here it is assigning an NSDictionary which is a the forst element of array.
i wanna know how i can make a data type like this and what it is called?
I need to create new data type with a NSDictionary and then when i declare the object be able to work with that with its functions ,look at this code
this code is doing what i want
.h file
Complete code
Code:
@interface TFHppleElement : NSObject {
@private
NSDictionary * node;
TFHppleElement *parent;
}
.m file
Complete Code
Code:
@interface TFHppleElement ()
@property (nonatomic, retain, readwrite) TFHppleElement *parent;
@end
@implementation TFHppleElement
@synthesize parent;
and for using it's like this:
Code:
TFHppleElement * element = [elements objectAtIndex:0];
i wanna know how i can make a data type like this and what it is called?