Xcode错误:预期类型

时间:2015-12-03 11:23:04

标签: ios objective-c uiimage xcode7

    - (instancetype)initPrivate
{
    self = [super init];
    if (self) {
        _dictionary = [[NSMutableDictionary alloc] init];
    }
    return self;
}
- (void)setImage:(UIImage *)image forKey:(NSString *)key
{
    [self.dictionary setObject:image forKey:key];
}
- (UIImage *)imageForKey:(NSString *)key
{
    return [self.dictionary objectForKey:key];
}

我使用字典存储图像。我在setImage方法中遇到任何getImage方法的问题。

0 个答案:

没有答案