阅读背景:

ios当我创建一个类方法时,它显示错误:成员引用基类型'Class'不是结构或联合

来源:互联网 
@interface A : UIView{
   NSInteger z_num;
}
+ (void)getNum;
@end
@implementation A
+ (void)getNum{
__weak typeof(self) weakSelf = self;
[[SingletonClass shareInstance] getNum:^(NSInteger status, NSString *num) {
    __strong typeof(weakSelf) strongSelf = weakSelf;
    if (strongSelf) {
        if (status == NET_OK) {
            strongSelf->z_num = [num integerValue]; //error:Member reference base type 'Class' is not a structure or union
        }
    }

}];
}
@interface A : UIView{
   NSInteger z_num;
}
+ 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: