I have a class called business. The business class has properties "id", "name", "slogan", etc.
@interface Business : NSObject
@property (nonatomic) NSInteger id;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *slogan;
I created an instance of the object.
Business *newBusiness = [[Business alloc] initWithID:2];
This is where I need help. Say I wanted to call its "id" property, but want to do it through a variable.
NSString *property = @"slogan";
[newBusiness property] = @"We can do it!";
or
newBusiness.property = @"We can do it!";