Why is __strong required in fast enumeration loops with ARC
问题 When I do something simialr to the following I get an error saying for (UIView* att in bottomAttachments) { if (i <= [cells count]) { att = [[UIView alloc] extraStuff] } } Fast Enumeration variables cannot be modified in ARC: declare __strong What does __strong do and why must I add it? 回答1: If a variable is declared in the condition of an Objective-C fast enumeration loop, and the variable has no explicit ownership qualifier, then it is qualified with const __strong and objects encountered