相关疑难解决方法(0)

没有可见的界面错误

我在我的模型的实现文件中有一个错误,我已经注释掉了.我该怎么做才能解决这个问题?

提前致谢.

#import "CalculatorBrain.h"

@interface CalculatorBrain()
@property (nonatomic, strong) NSMutableSet *operandStack;
@end

@implementation CalculatorBrain

@synthesize operandStack = _operandStack;

- (NSMutableArray *)operandStack
{
    if (!_operandStack) {
        _operandStack = [[NSMutableArray alloc] init];
    }
    return _operandStack;
}

-(void)pushOperand:(double)operand
{
    NSNumber *operandObject = [NSNumber numberWithDouble:operand];
    [self.operandStack addObject:operandObject];
}

- (double)popOperand
{
    NSNumber *operandObject = [self.operandStack lastObject]; // No visible interface for 'NSMutableSet' declares the selector 'lastObject'
    if(operandObject)   [self.operandStack removeLastObject]; // No visible interface for 'NSMutableSet' declares the selector 'removeLastObject'
    return [operandObject doubleValue];
}

- …
Run Code Online (Sandbox Code Playgroud)

xcode ios

8
推荐指数
1
解决办法
3万
查看次数

标签 统计

ios ×1

xcode ×1