【发布时间】:2022-01-12 04:42:47
【问题描述】:
我想在调试时调用 enumerateObjectsUsingBlock 打印数组中的每个对象。 但是 lldb 似乎不支持 block ?有没有办法让它工作?
(lldb) expr -- [self.choiceQuestion.allNewRecommenedItems enumerateObjectsUsingBlock:void ^(id obj,NSUInteger index,BOOL* stop){NSLog(@"%@",obj);}]
error: <user expression 9>:1:76: expected '(' for function-style cast or type construction
[self.choiceQuestion.allNewRecommenedItems enumerateObjectsUsingBlock:void ^(id obj,NSUInteger index,BOOL* stop){NSLog(@"%@",obj);}]
【问题讨论】: