0

我认同。_iVar 受保护。

然而,我必须将这些添加到子类中:

@synthesize strFullName = _strFullName;
@synthesize strPictureURL = _strPictureURL;
@synthesize strID = _strID;
@synthesize strFirstName = _strFirstName;
@synthesize strLastName = _strLastName;

否则我的子类无法访问 _strLastName 等。为什么?

超类的声明是这样的:

@interface BGTwitterOrFacebookHandler : BGMotherOfAllHandler
-(void) vRequestPermission;
@property (nonatomic,readonly) NSString * strID;
@property (nonatomic, readonly) NSString * strFullName;
@property (nonatomic,readonly) NSString * strPictureURL;
@property (nonatomic,readonly) NSString * strFirstName;
@property (nonatomic,readonly) NSString * strLastName;
@property (nonatomic,readonly) NSString * strBirthday;
@property (nonatomic,readonly) NSString * strEmail;
@property (nonatomic,readonly) NSString * strGender;
@property (nonatomic) ACAccountStore * ACAstore;
@property (nonatomic) ACAccount * acAcount;
+(BGTwitterOrFacebookHandler *) singleton;
-(void)logout;
@end
4

0 回答 0