这个问题在这里已经有了答案:
Comparing in objective C - Implicit conversion of 'int' to 'id' is disallowed with ARC
(2 个回答)
4年前关闭。
这段代码:
[selectedTagIndexes addObject: (int)sender.tag - 100];
Implicit conversion of 'int' to 'id _Nonnull' is disallowed with ARC
最佳答案
你不能在这里直接转换所以像这样使用,
[selectedTagIndexes addObject:[NSNumber numberWithInteger:sender.tag-100]];
关于objective-c - ARC 不允许将 'int' 隐式转换为 'id _Nonnull',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47832029/