incrementing variable names in xcode? [duplicate]
问题 This question already has answers here : Objective C Equivalent of PHP's “Variable Variables” [duplicate] (2 answers) Closed 3 years ago . Incrementing variable names In xcode I want to create 100 images one with the name1,2,3,4 ect. And i can do it all except for the variable names. For these I was wandering is it possible to increment the variables programmatically or whether it must be done manually? 回答1: Instead of creating a bunch of variable names, you can use a dictionary object with