self.state = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(state))] integerValue];
错误是
assigning to “”AFOperationState”” from incompatible type ‘NSInteger’ (aka “”long””)
解决方案:40分
这是类型的问题,改成这样试试:
self.state = (AFOperationState)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(state))] integerValue];