your class be should look like this .h file @interface Class_B : UIViewController
@property (copy,nonatomic) NSString *someValue;
@end
.m file
@implementation Class_B
@synthesize someValue = _someValue;
- (void) viewDidLoad {
_someValue = @"This is my come value";
}
@end
and calling class (Class_A) it should be like this
- (void) viewDidLoad {
Class_B *cls_b = [[Class_B alloc] initWithNibName:@"Class_B_nib" bundle:nil];
NSLog(@"Some value echo :%@",cls_b.someValue);
}