Hi,
I need to access a value of variable of A class in B class.
class A
{
NSString *name;
}
@property (nonatomic, retain) NSString * name;
then i do some calculations in the name.Now name ="hello123"
class B
{
A *aobject=[[Address alloc]init];
NSLog(@"In B class: %@", aobject.name);
}
I got the below message
In B class =null.
how can i get the value "hello123" from A class
I need to access a value of variable of A class in B class.
class A
{
NSString *name;
}
@property (nonatomic, retain) NSString * name;
then i do some calculations in the name.Now name ="hello123"
class B
{
A *aobject=[[Address alloc]init];
NSLog(@"In B class: %@", aobject.name);
}
I got the below message
In B class =null.
how can i get the value "hello123" from A class