如果这是在obj-c
@interface SomeClass : NSObject
@property (nonatomic,strong) NSString* name;
@end
@implementation SomeClass
@synthesize name;
//If we want to implement our own setter to do something
- (void)setName(NSString*)aString {
name = aString;
}
@end
这是rubymotion中的
class SomeClass < NSObject
attr_accessor :name
#If we want to implement our own setter to do something
def name=(aString)
@name = aString
end
end
如何(甚至可能)创建@property (nonatomic,strong, readonly)
?
我在哪里可以读到这个?