'why different classes can equilavent to each other and can read same property value

For example in this case;

@interface Anotherclass : Base
@property (nonatomic, strong) NSString * name;
@property (nonatomic, strong) NSString * surname;

@end

@interface SomeInfo : NSObject
@property (nonatomic, strong) NSString * name;
@end

SomeInfo *sInfo = [userInfo objectForKey:Notification_anotherclassobject];

why sInfo.name properly casts/ works? is there an explanation?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source